
897 So.2d 530 (2005)
T.B., a child, Petitioner,
v.
STATE of Florida, Respondent.
No. 4D05-711.
District Court of Appeal of Florida, Fourth District.
March 2, 2005.
Howard Finkelstein, Public Defender, and Julie Lindhal, Assistant Public Defender, Fort Lauderdale, for petitioner.
Charles J. Crist, Jr., Attorney General, Tallahassee, and Richard Valuntas, Assistant Attorney General, West Palm Beach, for respondent.
PER CURIAM.
Petitioner seeks relief from secure detention pursuant to a February 13, 2005 order of the circuit court. Habeas corpus is the proper remedy if a juvenile is illegally detained in violation of the risk assessment requirements, detention statutes, and case law. See M.P. v. Gardner, 838 So.2d 711, 712 (Fla. 4th DCA 2003).
Petitioner was arrested for various drug offenses. At the February 13 hearing, a detention Risk Assessment Instrument (RAI) score was tabulated. The trial court scored eleven points for petitioner's prior contacts with the law. Of these eleven points, one point was scored for petitioner's prior history. Then, the trial court assessed one final point, for aggravation of the scoresheet total, based on petitioner's prior criminal history. It was this additional point that qualified petitioner for secure detention.
We agree with petitioner that the trial court erred in assessing him one point as an aggravating factor based on the finding of a "significant prior record" when petitioner had already been assessed one point in the prior history section of the RAI scoresheet. See D.G. v. Miles, 872 So.2d 343, 344 (Fla. 2d DCA 2004); P.A.J. v. Gnat, 684 So.2d 310, 311 (Fla. 1st DCA 1996).
The petition for writ of habeas corpus is granted.
STONE, STEVENSON and GROSS, JJ., concur.
