
245 S.W.3d 257 (2008)
Fernando SMITH, Relator,
v.
Honorable John F. KINTZ, Respondent.
No. ED 90472.
Missouri Court of Appeals, Eastern District, Writ Division I.
February 5, 2008.
*258 Linda F. Jarman, Ferguson, MO, for Appellant.
Lynn Ricci, St. Louis, MO, for Respondent.
GEORGE W. DRAPER III, Presiding Judge.
Fernando Smith (hereinafter, "Relator") filed a petition for writ of mandamus to order the Honorable John F. Kintz (hereinafter, "Respondent") to vacate an order of civil contempt entered against him for failing to pay child support and maintenance. Relator seeks to be released from incarceration in order obtain representation and challenge the underlying contempt order. We vacate our preliminary order in mandamus and enter a writ of habeas corpus.
Relator's marriage to Maria Smith (hereinafter, "Mother") was dissolved in February 2007. Mother was awarded maintenance in the amount of $300 per month and child support in the amount of $700 per month. Relator was ordered to pay approximately $2,100 in arrearages for child support that accrued during the pendency of the dissolution.
After the dissolution decree was entered, Relator was laid off by his employer and failed to pay the full amounts due to Mother for maintenance and child support. The record reflects Relator paid approximately $675. Mother filed a motion for contempt on August 14, 2007, and a hearing was held on October 9, 2007.
Relator alleges in his petition that he was prevented from offering any evidence to defend against the contempt allegations. Relator claims he met with Respondent and Mother's counsel prior to the hearing to request a continuance so he could obtain an attorney. Relator asserts Respondent denied Relator's request and informed him the hearing would be held that day, which was the first setting.
The hearing transcript reflects Relator appeared pro se at the hearing. There was no discussion on the record with respect to Relator's request for a continuance in order to obtain counsel. At the hearing, Mother testified she received only $675 from Relator since their dissolution in February 2007. Mother also stated Relator told her he would make himself unemployed before "she got a dime" from him for support. Relator attempted to cross-examine Mother, but was unsuccessful at eliciting any responses over Mother's counsel's objections. Relator briefly testified on his own behalf and conceded he paid only $675 since the dissolution in February 2007. Relator explained he was laid off and collected unemployment, but was now working and "trying to do more."
At the close of the hearing, Respondent entered his judgment of contempt against Relator. Respondent sentenced Relator to be incarcerated until he paid $12,115 in arrearages for child support and maintenance.
After he was incarcerated, Relator obtained counsel who filed a writ of mandamus with this Court on November 5, 2007. *259 Respondent filed a response in opposition on November 20, 2007. In that response, the focus was on the underlying merits of the contempt hearing, not the issue of whether Relator was denied his right to counsel. However, it was alleged Relator failed to provide a transcript of the contempt proceedings which was suggested would refute Relator's allegations.
Based upon this response, this Court issued a preliminary order in mandamus on November 26, 2007, directing Respondent to file an answer to Relator's petition and directed Respondent "to specifically address in your answer whether Relator requested an attorney on October 9, 2007, and if so, the response if any and whether Relator was advised of his right to an attorney." On that same day, this Court ordered Relator to provide a transcript of the contempt hearing. After granting Respondent additional time to review the transcript and answer the petition, Respondent filed its answer.
Respondent's answer failed to address the issues specified in this Court's preliminary order in mandamus. With respect to the issue of Relator's lack of representation at the contempt hearing, Respondent answered as follows:
By way of further answer, on information and belief [Relator] was at all times acting with the advise [sic] of counsel despite no formal entry being made by his counsel until the day after the contempt hearing. By [Relator's] words and actions, counsel for Mother concluded [Relator] had an attorney despite no formal entry. . . . While [Relator's] filings were pro se, his word usage and formatting lead to the clear conclusion that he acted with advise [sic] of counsel.
Further, as adduced at the divorce trial, [Relator] is a savvy business man with no less than six businesses, five rental properties and a timeshare and four vehicles. Evidence adduced at the divorce trial displayed his extensive use of attorneys in his holdings and otherwise. . . . [Relator] was represented throughout two years of litigation in the divorce proceedings. . . . Further, [Relator] was represented by two different counsel [sic] in his bankruptcy proceeding pending during the divorce. . . .
Upon reviewing the transcript and Respondent's answer, we vacated our preliminary order in mandamus on December 17, 2007, and treated the cause as one for habeas corpus. We ordered Relator released from confinement because his custody was illegal.
"On an application for a writ, a court may grant the appropriate remedy irrespective of the relator's prayer." State ex rel. Stewart v. Civil Service Com'n of City of St. Louis, 120 S.W.3d 279, 285 (Mo.App. E.D.2003). See generally, State ex rel. Mertens v. Brown, 198 S.W.3d 616, 619 (Mo. banc 2006). Moreover, Rule 91.06 mandates:
Whenever any court of record, or any judge thereof, shall have evidence from any judicial proceedings had before such court or judge that any person is illegally confined or restrained of liberty within the jurisdiction of such court or judge, it shall be the duty of the court or judge to issue a writ of habeas corpus for the person's relief, although no petition be presented for such writ.
Therefore, we treat Relator's petition for a writ of mandamus as a writ for habeas corpus based upon the evidence presented to this Court pursuant to Rule 91.06.
Relator alleges in his petition Respondent exceeded his authority in finding him in contempt and prevented him from offering any evidence to defend against Mother's contempt claim. Prior to the hearing, Relator contends, and Respondent *260 has not disputed, that he requested a continuance in order to obtain representation. Respondent denied Relator's request and held the hearing that morning.
Procedural due process "requires that one charged with contempt of court be advised of the charges against him, have a reasonable opportunity to meet them by way of defense or explanation, have the right to be represented by counsel, and have a chance to testify and call other witnesses in his [or her] behalf, either by way of defense or explanation." Cheatham v. Cheatham, 101 S.W.3d 305, 309 (Mo.App. E.D.2003)(citing Hunt v. Moreland, 697 S.W.2d 326, 328-29 (Mo. App. E.D.1985))(quoting In re Green's Petition, 369 U.S. 689, 691-92, 82 S.Ct. 1114, 1116, 8 L.Ed.2d 198 (1962)). In the case of indirect contempt, civil or criminal, unless the trial judge predetermines the nature of the infraction is of insufficient gravity to warrant the imposition of imprisonment if the accused is found guilty, the unrepresented accused must be advised of his or her right to counsel and, absent a knowing and intelligent waiver thereof, be given adequate opportunity to obtain representation. Cheatham, 101 S.W.3d at 309. If the accused is determined to be indigent, counsel must be appointed before any critical stage of the contempt proceeding. Id.
Here, the record does not reflect that Respondent informed Relator that he had the right to be represented by counsel at the contempt hearing. In fact, Relator requested a continuance to obtain counsel, which was denied. Further, Respondent did not inquire as to whether Relator was indigent, and therefore, could have had counsel appointed for him. Nor is there any indication in the record Respondent questioned Relator whether he wished to waive his right to counsel prior to proceeding.
"An order of incarceration cannot be upheld if the unrepresented accused is not advised of his right to counsel and in the absence of representation by counsel or a knowing and intelligent waiver of counsel." Persky v. Persky, 96 S.W.3d 910, 914 (Mo.App. E.D.2003). See also, Cheatham, 101 S.W.3d at 310. Thus, Respondent exceeded his authority in proceeding with the contempt hearing and violated Relator's due process rights without specifically advising Relator of his right to counsel and without a knowing and intelligent waiver of this right. Id.
Based on the foregoing, Relator's petition is granted. The writ is issued, made absolute, and Relator is ordered discharged.
LAWRENCE E. MOONEY, J., and KURT S. ODENWALD, J., concur.
