
967 So.2d 342 (2007)
Kevin JONES and Virgil Swindle, Petitioners,
v.
Timothy P. RYAN, Director, Miami-Dade County Corrections and Rehabilitation Department, Respondent.
Nos. 3D07-2429, 3D07-2422.
District Court of Appeal of Florida, Third District.
October 5, 2007.
*343 Bennett H. Brummer, Public Defender, and Manuel Alvarez, Assistant Public Defender, for petitioners.
Bill McCollum, Attorney General, and Maria T. Armas, Assistant Attorney General, for respondent.
Before SHEPHERD, SUAREZ, and ROTHENBERG, JJ.
ROTHENBERG, Judge.
In these consolidated cases, Kevin Jones ("Jones") and Virgil Swindle ("Swindle") seek habeas corpus relief based upon their confinement for 179 days and 240 days respectively, as a result of being found in civil contempt of court by the trial court for failure to comply with its orders. Because the orders issued by the trial court and the court history of each of the petitioners differ, we briefly address them separately.

JONES
A final domestic violence injunction was entered against Jones on September 14, 2006. The final judgment ordered Jones to report to the Advocate Program within twenty-four hours and to enroll in and successfully complete a certified batterer's program and a substance abuse program, and to obtain a mental health evaluation and treatment through a licensed mental health professional.
Jones, however, failed to comply with the court's order, which resulted in several notices and hearings for civil contempt. On February 6, 2007, the trial court entered an order finding Jones in civil contempt of court for failing to complete the Advocate Program; he was ordered to be confined at the Dade County Jail for 179 days commencing on February 13, 2007; and was given an opportunity to purge the order of contempt by re-enrolling in the Advocate Program within twenty-four hours and successfully completing it. Jones failed to avail himself of the purge provisions of the trial court's civil contempt order, in that he failed to report to the Advocate Program, even after the trial court gave Jones several opportunities to do so. In justifiable frustration, the trial court noticed Jones for another contempt hearing, and ultimately found Jones to be in civil contempt for failing to comply with its orders, and sentenced Jones to 179 days in the Miami-Dade County jail.

SWINDLE
Swindle was likewise referred to the Advocate Program and ordered to enroll in and to complete various programs as a result of a domestic violence final judgment of injunction. When Swindle failed to comply with this order, the trial court twice noticed Swindle for contempt hearings, at which he failed to appear, and which resulted in warrants being issued for his arrest. The third such notice, and subsequent hearing, resulted in Swindle being found in civil contempt of court. The trial court's order sentenced Swindle to sixty days in the Miami-Dade County jail and contained a purge provision of enrollment and successful completion of the Advocate Program.
Swindle continued to fail to comply with the trial court's orders, even after being *344 brought before the trial court on several occasions for civil contempt hearings. After at least seven separate notices being issued for contempt proceedings and several findings of civil contempt, Swindle was ultimately sentenced to 240 days in the Miami-Dade County jail.

ANALYSIS
Each contempt order issued by the trial court for Jones and Swindle, excluding the last orders by the trial court finding each to be in civil contempt of court and sentencing Jones to 179 days and Swindle to 240 days incarceration, contained a purge provision and is not under review. The last orders issued by the trial court, finding each to be in civil contempt of court, and sentencing each to incarceration, do not contain a purge provision. Jones and Swindle, therefore, argue that the contempt orders under review are criminal in nature, governed by Rule 3.840, Florida Rules of Criminal Procedure, and that the provisions of this rule were not complied with. We agree.
Civil contempt and criminal contempt are quite different. Civil contempt is designed to obtain compliance with a court order, whereas, the purpose of criminal contempt is to punish. See Bowen v. Bowen, 471 So.2d 1274, 1277 (Fla.1985). Because incarceration is utilized to obtain compliance in a civil contempt proceeding, the contemnor must be given the ability to comply with the court's order. Therefore, a civil contempt sanction must include a purge provision. Parisi v. Broward County, 769 So.2d 359, 365 (Fla.2000) (finding that a civil contempt order must include a purge provision); Bowen, 471 So.2d at 1277 ("Because incarceration is utilized solely to obtain compliance, it must be used only when the contemnor has the ability to comply.").
Because it is clear that the trial court was no longer attempting to obtain compliance from either Jones and Swindle, but rather, to punish each for their contemptuous disregard for its orders, the contempt orders under review are criminal in nature, requiring that the contemnors be afforded constitutional due process protections afforded criminal defendants. Parisi, 769 So.2d at 364-65. These include the right to be represented by counsel and, if indigent, to have counsel appointed. Id. Additionally, in the criminal contempt context, if the sanction involves imprisonment for more than six months, the contemnor has the right to a jury trial, and the trial court must issue a written order articulating the factual basis for the contempt finding. See Int'l Union, United Mine Workers of Am. v. Bagwell, 512 U.S. 821, 826-27, 114 S.Ct. 2552, 129 L.Ed.2d 642 (1994) ("For `serious' criminal contempts involving imprisonment of more than six months, these protections include the right to jury trial."); Fla. R.Crim. P. 3.840(f) (providing that an order finding the defendant in criminal contempt include a recital of the facts constituting the contempt).

CONCLUSION
Because the orders under review do not contain a purge provision, we grant the petitions as the defendants are not legally being detained under these contempt orders. We further instruct the trial court, if it wishes to impose a punishment for failing to comply with its orders, that it must comply with Rule 3.840, Florida Rules of Criminal Procedure, including (1) the issuance of an order to show cause to be served upon the defendants stating the facts upon which each defendant must answer; (2) the appointment of counsel if the defendant is indigent; (3) the opportunity for the defendant to elect a jury trial, if the sentence the trial court seeks to impose *345 is greater than six months; and (4) upon a finding of guilt, to afford the defendant with an opportunity to show good cause why the sentence should not be imposed and to offer evidence of mitigation. During the pendency of the matter, the trial court may consider and set bail in the manner provided by law in criminal cases. See Fla. R.Crim. P. 3.840(c).
Petitions granted, orders quashed, and Petitioners' immediate release from the custody of Miami-Dade County Corrections and Rehabilitation Department ordered.
This opinion shall take effect immediately, notwithstanding the filing of any motions for rehearing.
