
38 Wn. App. 586 (1984)
687 P.2d 877
In the Matter of the Marriage of VIRGINIA NIELSEN, Respondent, and ROBERT DONALD NIELSEN, Appellant.
No. 6257-7-II.
The Court of Appeals of Washington, Division Two.
August 27, 1984.
Robert Donald Nielsen, pro se.
Barry J. Dahl, for respondent.
PETRIE, J.
At the conclusion of a marital dissolution action, Robert Nielsen was summarily sentenced to 7 days in jail for disobeying certain pretrial orders. The contemptuous *587 behavior occurred prior to trial and outside the court's presence. Mr. Nielsen challenges the trial court's authority to punish him summarily. Having found that Mr. Nielsen received inadequate notice and no meaningful opportunity to be heard, we reverse.
In December 1981, Robert and Virginia Nielsen stipulated in open court that each would perform certain acts during the pendency of their dissolution action. This stipulation was reduced to writing and incorporated by reference in a pretrial order. Apparently Mr. Nielsen chose not to comply with certain provisions of the December 1981 order. Thus, in January 1982, Ms. Nielsen moved the court to hold Mr. Nielsen in contempt of court. The court issued an order admonishing the parties to comply fully with the provisions of the prior order. The matter was continued until February so that the court could evaluate whether Mr. Nielsen remained recalcitrant. In February 1982, the trial court found that Mr. Nielsen was in contempt of court and sentenced him to 10 days in jail. The sentence was suspended, however, to give Mr. Nielsen an opportunity to purge himself of contempt by complying with specified provisions of the stipulation.
During trial, Mr. Nielsen admitted that he had failed to comply with other provisions of the stipulation and that he had taken withdrawals from his business contrary to the terms of the December 1981 order. At the conclusion of trial, the judge sentenced Mr. Nielsen to 7 days in jail as punishment for his willful disobedience. Mr. Nielsen now asks us to decide whether the trial court exercised its contempt power properly.
We begin by noting that the power to censure contemptuous behavior is inherent in a court of general jurisdiction. State v. Estill, 55 Wn.2d 576, 349 P.2d 210, 89 A.L.R.2d 1251 (1960); State v. Heiner, 29 Wn. App. 193, 627 P.2d 983 (1981); Johnston v. Beneficial Management Corp. of Am., 26 Wn. App. 671, 614 P.2d 661 (1980), rev'd on other grounds, 96 Wn.2d 708, 638 P.2d 1201 (1982). In addition, the power has been conferred upon the courts by the Legislature. *588 RCW 7.20.010; RCW 9.23.010. Courts have long been counseled to exercise the contempt power with restraint and to refrain from using their inherent power unless the statutory contempt power is inadequate. State v. Heiner, supra.
Regardless of its derivation, i.e., by statute or inherent power, the contempt power is used either to punish or to coerce. When the primary purpose is to coerce a party to comply with an order or judgment, the contempt proceeding takes on a civil character. Keller v. Keller, 52 Wn.2d 84, 323 P.2d 231 (1958); State v. Heiner, supra; Rainier Nat'l Bank v. McCracken, 26 Wn. App. 498, 615 P.2d 469 (1980). When the primary purpose of the court is to punish, the proceeding is fundamentally criminal in nature. State v. Heiner, supra.
[1] Any exercise of the contempt power, whether it be to punish or to coerce, must comport with due process of law. To help identify what procedural safeguards must be employed to satisfy due process, a distinction has been drawn between "direct" and "indirect" contemptuous behavior. Direct contempt is based on acts committed in the court's immediate presence. This means that the judge has personal knowledge of all the essential elements of the offense and is in a position to evaluate the circumstances which evoked the contemptuous conduct. Bloom v. Illinois, 391 U.S. 194, 20 L.Ed.2d 522, 88 S.Ct. 1477 (1968); In re Oliver, 333 U.S. 257, 92 L.Ed. 682, 68 S.Ct. 499 (1948); Cooke v. United States, 267 U.S. 517, 69 L.Ed. 767, 45 S.Ct. 390 (1925). An indirect contempt is based on acts committed outside the presence of the court. If the judge lacks personal knowledge of the essential elements of the offense, a contemptuous act is indirect even though the offender has admitted the act in open court. In re Oliver, supra; United States v. Lee, 720 F.2d 1049 (9th Cir.1983).
A direct contempt may be punished summarily if ongoing proceedings are being interrupted and the authority of the court must be immediately asserted to restore order. United States v. Wilson, 421 U.S. 309, 44 L.Ed.2d 186, 95 *589 S.Ct. 1802 (1975); In re Oliver, supra; United States v. Lee, supra; State v. Caffrey, 70 Wn.2d 120, 422 P.2d 307 (1966). Where, as here, however, the contemptuous behavior is indirect, due process requires that the offender be given notice, a reasonable time to prepare a defense, and a hearing. Taylor v. Hayes, 418 U.S. 488, 41 L.Ed.2d 897, 94 S.Ct. 2697 (1974); Bloom v. Illinois, supra; United States v. Lee, supra. Justice Taft, writing for the Supreme Court, described the requirement as follows:
Due process of law, therefore, in the prosecution of contempt, except of that committed in open court, requires that the accused should be advised of the charges and have a reasonable opportunity to meet them by way of defense or explanation. We think this includes the assistance of counsel, if requested, and the right to call witnesses to give testimony, relevant either to the issue of complete exculpation or in extenuation of the offense and in mitigation of the penalty to be imposed.
Cooke v. United States, 267 U.S. 517, 537, 69 L.Ed. 767, 45 S.Ct. 390 (1925).
Here, the contempt power exercised at the conclusion of the trial was used to punish; Mr. Nielsen's contemptuous behavior was committed outside the presence of the court; and he was summarily punished long after the need to take immediate action had passed. The trial court's coercive sentence previously imposed expired when the trial was completed. See Shillitani v. United States, 384 U.S. 364, 16 L.Ed.2d 622, 86 S.Ct. 1531 (1966). We do not condone Mr. Nielsen's behavior. However, the trial court should have formally advised Mr. Nielsen of the contempt charge pending and given him a reasonable opportunity to prepare a defense or explanation. Because this was not done, we must reverse.
Ms. Nielsen seeks reasonable attorney's fees on appeal. She is not entitled to them. In view of our resolution of the nature of the ultimate sentence meted out to Mr. Nielsen, Ms. Nielsen was not even the necessary party to this appeal.
Sentence reversed with discretion to the trial court to *590 elect whether to proceed further with this cause in a manner consistent with this opinion.
PETRICH, C.J., and REED, J., concur.
