
318 So.2d 529 (1975)
Freddie LEWIS, Appellant,
v.
STATE of Florida, Appellee.
No. 74-1243.
District Court of Appeal of Florida, Second District.
September 5, 1975.
Rehearing Denied September 30, 1975.
William G. Dayton, of Dayton, Peel & Gibbs, Dade City, for appellant.
Robert L. Shevin, Atty. Gen., Tallahassee, and Charles Corces, Jr., Asst. Atty. Gen., Tampa, for appellee.
McNULTY, Chief Judge.
Appellant, a juvenile, appeals his escape conviction. We reverse.
Appellant was incarcerated in the Pasco County Jail to which he had been committed after a guilty plea involving charges of auto theft. It appears that while serving his sentence on those charges he and another prisoner became involved in an apparent escape. The other prisoner succeeded in fully escaping, but appellant climbed up a radio antenna onto the roof of the jail where he was later discovered and charged with the instant offense.
Pre-trial maneuvering has placed this case in an unusual posture; but not one incapable of resolution. First, appellant moved to quash the charge on several grounds, only one of which is meritorious at least as a potential defense at trial. That ground alleges the factual basis for his so-called "escape." He contends that another inmate, one Bobby Lane, had made sexual advances toward him and threatened him with sexual battery. He had complained to prison authorities, he says, but they did not believe his fears and ordered his return to Lane's cell. Accordingly, in fear, he attempted to escape for the purpose of reporting the matter to a Circuit Judge Williams and to avoid a possible sexual assault and battery. Next, the state moved to strike all the grounds for the aforesaid motion to quash, including the one predicated on the fear of sexual battery, alleging that each was irrelevant *530 and immaterial. The trial court granted the motion to strike and denied appellant's motion to dismiss. Appellant then pleaded nolo contendere, reserving the right to appeal the disposition of the pre-trial motions, and the judgment and sentence appealed from ensued.
In the recent case of Helton v. State[1] our sister court in the First District explored the question of intent as being an element of the crime of escape. The court reviewed the conflicting cases throughout the country and sided with the slight numerical minority view that justice and fairness require intent as an essential element of escape. Its conclusion was buttressed by the line of cases which have recognized the "narrow but time honored defense of necessity available to a prisoner whose escape has been motivated by sufficiently perilous circumstances."[2] That court held, therefore, that there are two elements to the crime of escape: the physical act of leaving custody coupled with the intent to avoid lawful confinement. We agree.
Here, appellant denied a wilful intent to escape, pointing to his having failed to flee completely with his fellow "escapee." He contended in his motion to quash that he was forced to leave confinement to avoid a sexual assault at the hands of Bobby Lane. He further contended that he was merely trying to reach Circuit Judge Williams to report the matter since the detention officers at the jail disbelieved his fears. If true, we think this could have been a valid defense insofar as it might establish a lack of wilful intent to avoid lawful confinement or at least create a reasonable doubt that there was one.
Such allegations made merely in a motion to quash would not, of course, authorize a dismissal of the charge. But certainly a defendant has a right to establish such a defense, as best he can, at trial. By striking such a defense here, the trial court clearly indicated that he would not permit the interposition of such a defense and appellant was justified in not undertaking a useless gesture by insisting on trial under his not guilty plea. He properly preserved his record for our review by entering his nolo contendere plea.
In view of the foregoing, therefore, the judgment and sentence appealed from should be, and they are hereby, vacated and set aside; the order granting the state's motion to strike appellant's defense insofar as it sought to establish lack of intent to commit the crime of escape should be, and it is hereby, reversed; and the cause is remanded for further proceedings not inconsistent herewith.
HOBSON and BOARDMAN, JJ., concur.
NOTES
[1]  (Fla.App. 1st, 1975), 311 So.2d 381.
[2]  See, 16 Cr.L.Rptr. 2375.
