
525 P.2d 537 (1974)
Dewey L. OTTON, Appellant,
v.
Stanley ZABORAC, Superintendent of South-Central Regional Correctional Institute, Appellee.
No. 2050.
Supreme Court of Alaska.
August 19, 1974.
J. Scott Evans, John E. Reese, Anchorage, for appellant.
Gerald W. Markham, Asst. Atty. Gen., Anchorage, Norman C. Gorsuch, Atty. Gen., Juneau, for appellee.
Before RABINOWITZ, C.J., and CONNOR, ERWIN, BOOCHEVER and FITZGERALD, JJ.

OPINION
CONNOR, Justice.
The question presented in this appeal is whether an indigent person faced with a civil contempt proceeding for nonpayment of child support is entitled to court-appointed counsel.[1]
Esther Otton obtained a decree of divorce from appellant Dewey Lee Otton on July 16, 1968. She also was awarded custody of the three children of the marriage. Under the decree appellant was required to make support payments for the children in the amount of $225 per month, plus a 3% collection fee.
On June 16, 1972, an order to show cause why appellant should not be held in contempt of court for failure to meet his support obligation was issued. The arrearage at that time was $9,660.50. At the show cause hearing before Superior Court Judge Butcher, Mr. Otton was asked whether he wanted a jury trial on the issue of his ability to pay[2] without being instructed that he had any right to consult an attorney. Mr. Otton was indigent at the time of this hearing. He requested a trial before the judge sitting without a jury. Apparently no evidence to support a defense was adduced at the hearing.
Appellant was adjudged to be in contempt and was committed to jail until he purged himself by paying his support obligation. He remained under a court order *538 limiting his freedom, although on a work release for a portion of the time, until his habeas corpus petition came before Superior Court Judge Carlson on May 1, 1973. The court found that appellant was indigent at the time of the contempt proceeding, that he was not instructed as to any right to counsel and did not waive any such right, and that an indigent in a contempt for nonsupport proceeding has no right to court-appointed counsel. Mr. Otton was released on his own recognizance pending appeal. He had, however, already been either in jail or under restraint for about ten months.
We hold that an indigent in a contempt for nonsupport proceeding has a right to a court-appointed attorney. We base this decision on the right to jury trial in a contempt proceeding for nonpayment of child support recognized in Johansen v. State, 491 P.2d 759 (Alaska 1971), and on the underlying rationale of that decision which focuses on the very real threat of incarceration.[3]
In Johansen we noted that although contempt for nonsupport has traditionally been characterized as a civil action, certain aspects of that action, in particular, the threat of incarceration, more closely approximate penal proceedings. This dual nature of the action necessitates a careful scrutiny of the procedures followed in order to ensure adequate protection of the interests involved:
"In these circumstances we find it appropriate to delineate the rights of the parties in such a way that all legitimate interests will be protected as fully as possible, departing from traditional contempt doctrine in those areas where we have found it to be deficient or where strict adherence to it would not lead to the soundest rule of law in terms of all the parties' interests." 491 P.2d at 765-766.
Constitutional considerations lead us to the conclusion the defendant's interests will not be adequately protected without the assistance of appointed counsel. The Alaska Constitution provides that "[n]o person shall be deprived of ... liberty ... without due process of law.[4] The federal constitution similarly provides that no state may deprive any person of liberty without due process.[5] Mr. Otton's interest in freedom from restraint has constitutional dimensions. State action which infringes upon that interest must be in accordance with the requirements of due process. Bush v. Reid, 516 P.2d 1215 (Alaska 1973).
Chief Justice Traynor, when discussing state involvement in civil mesne process, a procedure also initiated by and for the benefit of a private party, said:
"A state cannot deprive a person of his life, liberty, or property without affording him an opportunity to be heard by a tribunal empowered to decide the lawfulness of the deprivation... . Under the statutory scheme for mesne civil arrest the state deprives the defendant of his liberty through the process of its trial courts executed by its law enforcement officers. Although the statutory machinery is set in motion by a private plaintiff to satisfy a civil claim, the deprivation of liberty is effected by the State." In re Harris, 69 Cal.2d 486, 72 *539 Cal. Rptr. 340, 343, 446 P.2d 148, 151 (1968). (citations omitted)
In a contempt proceeding for nonsupport the deprivation of liberty is also effected by the state. Although the proceeding is characterized by its purpose of providing a remedy for a private party, disobedience of a lawful court order is a contempt "of the authority of the court." AS 09.50.010. Appearance in a contempt proceeding is compulsory.[6] The court trustee plays a role in the initiation of the enforcement proceedings. AS 09.55.210(5); Civil Rule 67(b). Imprisonment to coerce compliance is a remedy supplied by the state through both its judicial machinery and its penal institutions. AS 09.50.050. This use of the state's judicial machinery demonstrates state action which brings into play the due process clause.
Due process is flexible, and the concept should be applied in a manner which is appropriate in the terms of the nature of the proceeding. Joint Anti-Fascist Refugee Committee v. McGrath, 341 U.S. 123, 162, 71 S.Ct. 624, 644, 95 L.Ed. 817, 848 (1951). (Justice Frankfurter concurring). "The fundamental requisite of due process of law is the opportunity to be heard." Grannis v. Ordean, 234 U.S. 385, 394, 34 S.Ct. 779, 58 L.Ed. 1363, 1369 (1914) (citations omitted). See Nichols v. Eckert, 504 P.2d 1359 (Alaska 1973); Frontier Saloon, Inc., v. Alcoholic Beverage Control Board, 524 P.2d 657 (Alaska 1974). And, "[t]he right to be heard would be, in many cases, of little avail if it did not comprehend the right to be heard by counsel." Powell v. Alabama, 287 U.S. 45, 68-69, 53 S.Ct. 55, 64, 77 L.Ed. 158, 170 (1932).
We have consistently held that one facing a possible deprivation of liberty must be afforded all of the fundamental constitutional rights guaranteed by the federal and state constitutions. In Baker v. City of Fairbanks, 471 P.2d 386 (Alaska 1970), we held that a jury trial must be provided in any criminal prosecution, and "criminal prosecution" was interpreted to include misdemeanor prosecutions. Alexander v. City of Anchorage, 490 P.2d 910 (Alaska 1971), affirmed the right to court-appointed counsel in misdemeanor prosecutions where there is a possible penalty of imprisonment. Juveniles are entitled to a jury trial when facing possible incarceration, RLR v. State, 487 P.2d 27 (Alaska 1971), and are entitled to the assistance of counsel as well as pre-adjudication bail. Doe v. State, 487 P.2d 47 (Alaska 1971). Similarly, we held in Kostic v. Smedly, 522 P.2d 535 (Alaska 1974), that habeas corpus proceedings relating to the extradition of fugitives must be treated as criminal in nature. In criminal contempt proceedings the rights to jury trial and counsel must be satisfied. State v. Browder, 486 P.2d 925 (Alaska 1971). And in civil contempt proceedings for nonsupport, a jury trial must be available. Johansen v. State, 491 P.2d 759 (Alaska 1971).
The potential deprivation of liberty in nonsupport contempt proceedings is as serious a matter as the restraint of liberty possible in criminal, juvenile, and criminal contempt proceedings. Therefore, we hold that in the case before us due process of law requires the assistance of counsel. To again quote Chief Justice Traynor, in the context of civil mesne process:
"A defendant who is deprived of his liberty by civil process is as much entitled to due process of law as a defendant who is deprived of his liberty because he is charged with crime. The mesne process of civil arrest without opportunity to be heard with the assistance of counsel is not due process." In re Harris, 69 Cal.2d 486, 72 Cal. Rptr. at 344, 446 P.2d at 152.
*540 And, of course, this right to counsel would be of little avail if it were not afforded to those defendants unable to pay a private attorney.
"The constitutional guarantee [of assistance of counsel] would have little meaning if it did not also encompass the right of the poor person to have counsel appointed at public expense to represent him in a criminal action when he could not afford a lawyer." Alexander v. City of Anchorage, 490 P.2d 910, 913 (Alaska 1971).
Although a nonsupport contempt proceeding is not normally considered to be "criminal action," the possibility of incarceration is the same. In order to meet due process and equal protection considerations, a defendant must be afforded the right to counsel appointed by the court in those instances where the defendant is indigent.[7]
We note further that the need for assistance of counsel is enhanced by defendant's right to jury trial; this safeguard would be of little value unless the defendant could be assisted by counsel:
"It is clear that wherever the right-to-counsel line is to be drawn, it must be drawn so that an indigent has a right to appointed counsel in all cases in which there is a due process right to a jury trial. An unskilled layman may be able to defend himself in a nonjury trial before a judge experienced in piecing together unassembled facts, but before a jury the guilding hand of counsel is needed to marshal the evidence into a coherent whole consistent with the best case on behalf of the defendant. If there is no accompanying right to counsel, the right to trial by jury becomes meaningless." Argersinger v. Hamlin, 407 U.S. 25, 45-46, 92 S.Ct. 2006, 2016, 32 L.Ed.2d 530, 543 (1972). (Justice Powell, concurring).[8]
Our decision today is in harmony with the approach outlined in Johansen with regard to nonsupport actions. In that case we found that a jury trial was necessary as a procedural protection for the defendant facing incarceration. The present decision only ensures that the right to jury trial is not merely a hollow gesture. The burden of proof of inability to comply with the court order, which is the central issue in such contempt proceedings, is still with the defendant. To provide court-appointed counsel does not disturb the balance of interests struck in Johansen.
Reversed and remanded.
NOTES
[1]  The statutory foundations of civil contempt for nonsupport proceedings are found in AS 09.50.010(5) and AS 09.50.050. The former defines contempt as disobedience of a lawful court order while the latter provides for imprisonment until performance when it is within the power of the defendant to perform.
[2]  In Johansen v. State, 491 P.2d 759 (Alaska 1971), we held that a jury trial on the issue of ability to meet support obligations must be available in nonsupport proceedings.
[3]  Appellee State argues that the Johansen decision has already disposed of the issue on review, predicating this argument on the following language:

"Should this determination [ability to comply with the court order] be made without all criminal safeguards  with the exception of jury trial  even though incarceration hangs on the outcome? We believe that it should... ." 491 P.2d at 766.
However, later language in the opinion indicates that the question of procedural safeguards was not fully determined: "Doubtless, further procedural questions will arise in future cases." 491 P.2d at 767. The question of court-appointed counsel was not before the court in Johansen, and the appellant there was, in fact, represented by counsel. Johansen does not preclude consideration of the issue presented in this appeal.
[4]  Alaska Constitution, Article I, Section 7.
[5]  United States Constitution, Amendment XIV.
[6]  Civil Rule 90(b) provides that the court may either issue a show cause order or a bench warrant for the party's arrest in an indirect contempt situation. When read in conjunction with Criminal Rule 4, it is apparent that a bench warrant should only be issued if there is reason to believe that the defendant will not appear. Johansen v. State, 491 P.2d 759, 770 (Alaska 1971).
[7]  In other jurisdictions, the threat of incarceration has led to the development of strict procedural safeguards, normally only associated with criminal prosecutions in proceedings not traditionally within the "criminal" category. Specht v. Patterson, 386 U.S. 605, 87 S.Ct. 1209, 18 L.Ed.2d 326 (1967) (due process rights of defendant found guilty of a crime and later subjected to a psychiatric determination which might lead to indeterminate imprisonment); In re Gault, 387 U.S. 1, 87 S.Ct. 1428, 18 L.Ed.2d 527 (1967) (due process rights in juvenile proceedings); In re Grand Jury, 468 F.2d 1368 (9th Cir.1972) (right to appointed counsel in civil contempt proceeding based on witness' refusal to answer questions before a grand jury); In re Harris, 69 Cal.2d 486, 72 Cal. Rptr. 340, 446 P.2d 148 (1968) (appointed counsel in civil mesne process proceeding); People ex rel. Amendola v. Jackson, 74 Misc.2d 797, 346 N.Y.S.2d 353 (Sup.Ct. 1973) (appointed counsel in nonsupport action); Commonwealth v. Hendrick, 220 Pa.Super. 225, 283 A.2d 722 (1971) (appointed counsel in nonsupport action).
[8]  We made the same point in Baker v. City of Fairbanks, supra, 471 P.2d at 395, n. 14.
