
770 So.2d 273 (2000)
Charles MURRAY, Petitioner,
v.
Kathleen A. KEARNEY, Secretary, Department of Children and Families, and the State of Florida, Respondents.
No. 4D99-2970.
District Court of Appeal of Florida, Fourth District.
November 1, 2000.
*274 Bennett H. Brummer, Public Defender, and John E. Morrison, Assistant Public Defender, Miami, for petitioner.
Robert A. Butterworth, Attorney General, Tallahassee, and Margaret Brenan, Assistant Attorney General, Miami, for respondents.

ON MOTION FOR REHEARING
WARNER, C.J.
We withdraw our previously issued opinion and substitute the following in its place.
This is a petition for writ of habeas corpus filed by Charles Murray seeking an order of this court releasing him from a residential treatment center to probation. We conclude that we do not have jurisdiction and dismiss the petition.
In Dade County, petitioner was convicted, through a negotiated plea, of sexual battery on a minor child, the agreed sentence being incarceration followed by probation with a condition that petitioner complete a sex offender treatment program. After the incarcerative portion, and prior to release for service of the probation portion, petitioner was civilly committed to the Martin County Treatment Center as a sexually violent predator under the Ryce Act,[1] upon the state's motion. Petitioner then moved for specific performance of the plea agreement, asking that he be released to serve the agreed probation. In his petition, he contends that the motion was filed in the civil commitment case, rather than the criminal case. After a hearing, the trial court denied the motion. There is no written order.
Petitioner then filed the present habeas petition in this court arguing that the state must abide by its plea agreement, and (as petitioner clarified in his motion for rehearing) that the commitment order is illegal since the plea agreement provided how and where petitioner was to receive treatment after termination of his prison sentence.[2] Petitioner requested specific performance of his plea agreement.
Our habeas jurisdiction is limited to determining whether the challenged order was entered without jurisdiction or is illegal. See Alachua Reg'l Juvenile Detention Ctr. v. T.O., 684 So.2d 814, 816 (Fla. 1996). There is no question that the trial court had jurisdiction over the cause. Petitioner challenges the order of commitment as illegal, because he claims that the commitment violates his plea agreement which would have permitted him to be released into the community for probation and completion of a sex offender treatment program. However, the commitment order was not entered in the criminal proceeding, in which the court may consider whether the state violated the plea agreement. Instead, the Department of Children and Families instituted a new civil commitment proceeding, based upon clinical evaluations of petitioner's present state.
Although we recognize that the petitioner views his continued confinement as part of his incarceration from his plea, the law does not make this legal joinder any more than it would if the petitioner were committed under the Baker Act after his incarceration had been completed and while he was on probation. Moreover, the trial *275 judge considered that petitioner's probation continued while he was committed under the Involuntary Civil Commitment for Sexually Violent Predators Act. Therefore, the trial judge was well aware that he was dealing with two separate proceedings.
Petitioner has not cited to us any case law holding that the order of commitment is illegal. Even if we considered it a violation of the plea agreement, it still would not make the civil commitment illegal. His present confinement is the result of proceedings instituted against him in February of 1999 because he now qualifies as a sexually violent predator under section 916.32, Florida Statutes (Supp.1998).[3] While habeas corpus applies to civil commitment proceedings, see, e.g., Pompey v. Cochran, 685 So.2d 1007 (Fla. 4th DCA 1997)(granting habeas relief in civil contempt); cf. Jamason v. State, 447 So.2d 892, 895 (Fla. 4th DCA 1983) (generally, a habeas proceeding is an independent action, legal and civil in nature, designed to secure prompt determination as to legality of restraint in some form), petitioner has raised no argument that his confinement violates the requirements of the act under which his confinement was obtained.[4]
The petition is dismissed.[5]
KLEIN and HAZOURI, JJ., concur.
NOTES
[1]  See §§ 394.910-.931, Fla. Stat. (1999).
[2]  This court originally transferred the petition to the third district due to this court's lack of jurisdiction, but the third district transferred the case back to this court, also asserting a lack of jurisdiction.
[3]  Renumbered to § 394.912, Fla. Stat. (1999), effective May 26, 1999.
[4]  Petitioner's allegations sound more in the nature of alleging an equitable estoppel against the state pursuing civil commitment, particularly because petitioner substantially changed his position by agreeing to his plea and sentence seven years ago, serving the incarcerative portion and then not getting the bargained for benefit of release from confinement by the state. This too, however, is not an issue of illegality for habeas jurisdiction to lie.
[5]  Petitioner also alleges that he has been "incarcerated" in a "prison-like setting." If he is in fact in the functional equivalent of a prison, a challenge based on a factual allegation, such as this, should be brought in the circuit court. See Sneed v. Mayo, 66 So.2d 865 (Fla.1953).
