Appellant appeals his conviction and sentence for escape under section 944.40, Florida Statutes (2010), following his entry of a no contest plea to that offense. We find fundamental error on the face of the record in appellant’s conviction and sentence to four years in prison followed by five years of probation. We reverse for the trial court to provide appellant with an opportunity to withdraw his plea.
The record, including the factual basis for appellant’s plea, reflects that appellant was in the custody of the Department of Juvenile Justice, and was then brought to a hospital, where he remained under DJJ supervision. Appellant escaped from the hospital.
“The applicable escape statute depends on the location of the defendant at the time of the attempt....” State v. King, 968 So.2d 658, 658 (Fla. 4th DCA 2007). “Section 944.40 covers escape attempts by a prisoner, who is defined as someone in the custody of the [Department of Corrections] pursuant to section 944.02(6), Florida Statutes.... ” Id. In contrast, section 985.721, Florida Statutes (2010), “deals with escape attempts, as defined by section 944.40, from detention facilities for children.” Id. This section also governs escape while being lawfully transported to or from such a secure detention facility. § 985.721(3), Fla. Stat. (2010).1
In this case, appellant’s escape was plainly controlled by section 985.721, Flori*454da Statutes (2010), and therefore, appellant would be entitled to postconviction relief for pleading to the wrong offense. See Hodges v. State, 107 So.3d 538, 540 (Fla. 2d DCA 2013) (“When a movant alleges that the trial court failed to determine that there was a factual basis for his plea and that he is innocent of the offense to which he pleaded or that he pleaded to the wrong offense, the movant sets forth a facially sufficient claim for postconviction relief.”). Florida courts have remanded to allow an opportunity for withdrawal of a plea in the limited circumstance where ineffective assistance of counsel appears on the face of the record and affirming without prejudice to the filing of a motion for postconviction relief under rule 3.850 would be contrary to the interests of judicial economy. See Taylor v. State, 919 So.2d 669, 670-71 (Fla. 2d DCA 2006); Barber v. State, 901 So.2d 364, 366 (Fla. 5th DCA 2005). See also Quillen v. State, 73 So.3d 890, 893 (Fla. 4th DCA 2011) (“Even if [defendant] had not filed a motion to withdraw plea, defense counsel’s ineffective assistance, which the record reflects on its face, would still have compelled us to reverse to give [defendant] an opportunity to withdraw his plea.”). We find the present circumstances, where counsel’s failure to recognize this issue resulted in a fundamentally erroneous plea to the incorrect offense, to be sufficiently analogous to warrant the same relief.
Further, both prongs of Strickland v. Washington, 466 U.S. 668, 104 S.Ct. 2052, 80 L.Ed.2d 674 (1984) are satisfied here. Appellant was prejudiced by counsel’s performance as he could not lawfully be sentenced to four years in prison followed by five years’ probation for the third-degree felony of escape from a secure detention facility. See Danzy v. State, 603 So.2d 1320, 1322-23 (Fla. 1st DCA 1992) (finding fundamental error in illegal sentence to six years’ imprisonment where defendant escaped from juvenile detention center); Trueblood v. State, 610 So.2d 12, 13-14 (Fla. 1st DCA 1992).
As a result, we reverse and remand with directions to the trial court to afford appellant the opportunity to withdraw his plea.
Reversed and remanded for appellant to be provided with an opportunity to withdraw his plea.
WARNER, GROSS and LEVINE, JJ., concur.. A conviction under section 944.40, Florida Statutes (2010), is a second-degree felony, punishable by a term of imprisonment not exceeding fifteen years, while a conviction under section 985.721, Florida Statutes (2010) is a third-degree felony, punishable by *454an imprisonment term not exceeding five years. § 775.082(3)(c), (d), Fla. Stat. (2010).