
417 N.W.2d 801 (1987)
Patricia Ann (Hampton) BAIER, Plaintiff and Appellee,
v.
James William HAMPTON, Defendant and Appellant.
Civ. No. 870076.
Supreme Court of North Dakota.
December 29, 1987.
*803 Dennis M. Lothspeich, Asst. State's Atty., Williston, for plaintiff and appellee.
Bjella, Neff, Rathert, Wahl & Eiken, Williston, for defendant and appellant; argued by William E. McKechnie.
LEVINE, Justice.
James William Hampton appeals from a district court order finding him in contempt of court for failure to pay child support and for deceitful and evasive testimony. At issue is whether the contempt order is criminal in part, and if so, whether there was compliance with the procedural requirements of N.D.R.Crim.P. 42.[1] We hold that the contempt order was in part criminal, that the procedure outlined in Rule 42(b) was not followed, and that the criminal contempt portion of the order is, therefore, improper. We affirm in part and reverse in part.
In a February 25, 1985 Ward County divorce decree, Hampton was ordered to pay $115 a month per child for the support of two children. The judgment was transcribed to Williams County for enforcement, and in August 1986, the first of several hearings was held to determine Hampton's ability to pay. At the August hearing, Hampton testified that he was receiving military retirement benefits in the amount of $466 per month and he was "living off [this] retirement only." At subsequent hearings, Hampton reiterated that his military retirement benefits were his only source of income.
At a March 2, 1987 hearing, the court first learned that Hampton also had been receiving monthly military educational benefits of approximately $606 during the 1986-87 school year. In order to determine what portion of the educational benefits were paid because of Hampton's two children, the court continued the hearing until March 9, 1987. At that time, the court again continued the hearing, warning that Hampton "might be held in contempt of court" and that "if he's been lying to the Court, then he's got some punishment coming."
The hearing was reconvened on March 12, 1987, and Hampton was asked why he had not informed the court about his military educational benefits. He responded that he did not consider those benefits to be income. After further questioning and explanation, the court found Hampton in contempt and entered the following written order:
"a. THAT Respondent, without justification or excusable reason, has failed to pay support as required by court order, and was deceitful and evasive as to income.
"b. THAT Respondent is guilty of civil contempt of court.
"c. THAT jail punishment is hereby imposed to impress upon Respondent the *804 need to comply with a court order when he has the ability to comply but fails without justification to comply in a significant manner and didn't reveal his true income.
* * * * * *
"5. THAT Respondent be CONFINED to the county JAIL until he pays $205.00 on back support and until he serves sixty (60) days in jail, or until further court order.
"6. THAT Respondent may purge himself of punishment of thirty (30) days by hereafter making payments as required by this Order of $205.00 forthwith.
* * * * * *
"8. Other. Paragraph five above means that Defendant is held in civil contempt of court for making deceitful and evasive answers concerning income and is ordered to serve sixty (60) days in the Williams County Jail. He may purge himself of thirty (30) days by paying up arrearages due of $205.00 forthwith. In addition, the Defendant may be released during school hours to attend classes at UND-Williston."
Hampton contends that the sanction imposed against him exceeds that authorized by N.D.C.C. § 27-10-04(2) for civil contempt.[2] He argues that he has purged himself of the contempt by paying the delinquent child support and, therefore, the unconditional jail sentence was unauthorized.
Baier responds that the primary purpose of the sanction was to coerce Hampton into paying the child support and to impress upon him the need to disclose his true income to the court so that child support could be set at a fair amount. She argues that N.D.C.C. § 27-10-04(2) is not applicable to this case because Hampton's conduct was not merely an omission to perform a duty or act, but was a willful act of deceit and, therefore, the district court was authorized to impose an unconditional jail term pursuant to the introductory provision of N.D.C.C. § 27-10-04. We disagree.
Our analysis of that statute focuses on the distinction between civil and criminal contempt. Our review also entails the distinction between direct and indirect contempt and is premised upon the district court's determination that Hampton was in contempt of court for two separate acts: (1) failure to pay child support, and (2) deceitful and evasive testimony about his income.
Generally, in distinguishing civil from criminal contempt, we look at the sanction and its nature and purpose, rather than the conduct. Shillitani v. United States, 384 U.S. 364, 86 S.Ct. 1531, 16 L.Ed.2d 622 (1966); State v. Stokes, 240 N.W.2d 867 (N.D.1976). If the sanction's purpose is coercive, that is, to induce performance of an act primarily for another's benefit, the contempt is civil. State v. Stokes, supra. If the contemptuous conduct has been concluded and the purpose of the sanction is to punish the offender and vindicate the authority of the court, the contempt is criminal. Id. Merely because *805 a coercive sanction incidentally benefits another person does not change the contempt from civil to criminal. Gompers v. Buck's Stove & Range Co., 221 U.S. 418, 31 S.Ct. 492, 55 L.Ed. 797 (1911). So too, a punitive sanction that incidentally coerces does not transform criminal contempt into civil contempt. Id.
Usually, in civil contempt, the sanction is conditional in nature so that contemnors carry "`the keys of their prison in their own pockets'" and stand committed unless and until they perform an affirmative act. Shillitani, supra, 384 U.S. at 368, 86 S.Ct. at 1534, 16 L.Ed.2d at 626, quoting In re Nevitt, 117 F. 448, 461 (8th Cir.1902). Conversely, because the purpose of the sanction for criminal contempt is to punish the offender and vindicate the authority of the court, the sanction for criminal contempt is, ordinarily, unconditional. Gompers, supra. Construing the introductory language of N.D.C.C. § 27-10-04 to authorize an unconditional jail sentence for civil contempt overlooks the coercive-punitive distinction between civil and criminal contempt. See State v. Stokes, supra. We therefore construe that language to prescribe the maximum sanction for civil contempt which may be imposed to coerce performance.
While the district court's order recited that Hampton was in civil contempt of court, that label is not conclusive and the nature and purpose of the sanction must be examined. E.g., Shillitani, supra. The order required Hampton to pay $205 in back support and to serve sixty days in jail, but permitted him to purge thirty days of the jail sentence by paying the $205. The order thus required Hampton to unconditionally serve thirty days in jail, without being afforded an opportunity to purge the contempt. The district court did not specify which conduct, the failure to pay child support, the deceitful and evasive testimony, or both, provoked the unconditional sanction.
Hampton's failure to pay child support constitutes a duty which is yet within his power to perform. N.D.C.C. § 27-10-04(2). The purpose of the sanction that permitted Hampton to purge thirty days of the jail sentence by paying the past due child support was to coerce his payment of past due child support for the benefit of the children. He thus carried the keys to prison in his own pocket. The coercive purpose of that sanction characterizes that conduct as civil contempt.
The unconditional nature of the remaining thirty day jail sentence indicates a punitive purpose to vindicate the authority of the court. That punitive purpose is corroborated by the trial court's admonition that Hampton had some punishment coming if he had been lying to the court and that the jail sentence was imposed to impress upon him the need to comply with a court order. The fact that Hampton's children may ultimately derive some incidental benefit from the unconditional jail sentence does not change the character of the punishment from punitive to coercive. We conclude that the trial court found Hampton in civil contempt for failure to pay child support and in criminal contempt for his testimony about his income.
Civil and criminal contempt proceedings may be combined if the punitive aspect conforms to the procedure for criminal contempt and the coercive or remedial aspect conforms to the procedure for civil contempt. Swift & Co. v. United Packing House Workers of America, 228 Minn. 571, 37 N.W.2d 831 (1949); see Parker v. United States, 153 F.2d 66 (1st Cir.1946).
The prescribed procedures for civil and criminal contempt are outlined in N.D. C.C. §§ 27-10-06 [direct civil contempt]; 27-10-07 et seq. [indirect civil contempt]; and N.D.R.Crim.P. 42 [direct and indirect criminal contempt]. Both criminal and civil contempt may be direct and punished summarily, or indirect and punished after notice and an appropriate hearing. Klein v. Snider, 253 N.W.2d 425 (N.D.1977); LePera v. Snider, 240 N.W.2d 862 (N.D.1976).
Direct contempt involves conduct committed in the immediate view and presence *806 of the court and may be punished summarily. N.D.C.C. § 27-10-06; N.D.R.Crim.P. 42(a). Indirect contempt involves conduct that occurs outside the immediate view and presence of the court and requires that the accused be afforded notice and a fair hearing. N.D.C.C. § 27-10-07; N.D.R.Crim.P. 42(b).
If the court has not personally observed the essential elements of the offense, or if the accused offers an excuse relating to matters outside the knowledge of the court, due process requires that the accused be afforded notice and a full opportunity to explain and defend. LePera v. Snider, supra; N.D.C.C. § 27-10-07; N.D. R.Crim.P. 42(b). Any doubt as to whether the contempt is direct or indirect should be resolved in favor of complying with the procedures for indirect contempt because the summary procedures for direct contempt are less favored than the procedural protections required for indirect contempt. See Taylor v. Hayes, 418 U.S. 488, 94 S.Ct. 2697, 41 L.Ed.2d 897 (1974).
Failure to pay child support involves matters occurring outside the immediate view and presence of the court and requires that the procedures for indirect contempt be followed before the imposition of a sanction. Klein v. Snider, supra. Generally, prior perjury and false swearing, although occurring in court and witnessed by a judge, constitute indirect and not direct contempt, unless the falsity of the statement is admitted by the contemnor. See People v. Bennett, 51 Ill.2d 282, 281 N.E.2d 664 (1972); People v. Randall, 89 Ill.App.3d 406, 44 Ill.Dec. 651, 411 N.E.2d 1017 (1980); Chavez-Rey v. Chavez-Rey, 213 So.2d 596 (Fla.App.1968); State v. Estill, 55 Wash.2d 576, 349 P.2d 210 (1960); see generally Annot. 89 A.L.R. 2d 1258 (1963). If the perjury or false swearing is not admitted and extrinsic evidence is necessary to establish the conduct or excusing circumstances, summary proceedings are inappropriate.
Hampton does not assert that he was denied notice or an opportunity to be heard for the civil contempt. See N.D.C.C. § 27-10-07. Therefore, we affirm that portion of the district court order finding Hampton in civil contempt of court for failure to pay child support and imposing a conditional sanction for that conduct.
As to the criminal contempt based upon deceitful and evasive testimony, Hampton offered an excuse about his testimony. His excuse related to matters outside the knowledge of the court, thereby making the criminal contempt indirect, and triggering the procedural protections of N.D.R. Crim.P. 42(b). During oral argument, it was conceded that the contempt hearing was not conducted pursuant to N.D.R. Crim.P. 42(b). Accordingly, we reverse the unconditional thirty day sentence imposed against Hampton for criminal contempt. Any further proceedings must be conducted pursuant to N.D.R.Crim.P. 42(b).
We affirm that portion of the order finding Hampton in civil contempt for failure to pay child support and imposing a conditional sanction; we reverse the order finding Hampton in criminal contempt and imposing an unconditional thirty day jail sentence.
ERICKSTAD, C.J., and GIERKE and MESCHKE, JJ., concur.
VANDE WALLE, Justice, concurring in result.
In retrospect the majority concludes that the contempt order was in part criminal and that because Hampton did not receive notice or an opportunity to be heard on the criminal contempt, that portion of the order must be reversed. The majority affirms that portion of the order which it concludes is a civil contempt. Presumably civil contempt also requires some form of notice and opportunity to be heard and it may seem inconsistent to conclude that Hampton had notice of the one and not the other as they arise from the same facts. The answer may be found in that portion of the majority opinion which observes that Hampton did not assert that he was denied *807 notice or an opportunity to be heard for civil contempt. However, I am uncomfortable with that explanation because it appears to me that Hampton knew of the trial court's concern as a result of the March 2, 1987, hearing and had notice of what the court intended to do.
I nevertheless concur in the result reached by the majority if only to signal our concern that in the sensitive area of contempt the factual differences which distinguish direct and indirect and civil and criminal contempt be recognized, that the procedural niceties attendant thereto be scrupulously observed, and that any doubt as to whether the contempt is direct or indirect be resolved by complying with the procedures for indirect contempt.
NOTES
[1]  N.D.R.Crim.P. 42 provides:

"(a) Summary Disposition. A criminal contempt may be punished summarily if the judge certifies that he saw or heard the conduct constituting the contempt and that it was committed in the actual presence of the court. The order of contempt shall recite the facts and shall be signed by the judge and entered of record.
"(b) Disposition Upon Notice and Hearing. A criminal contempt, except as provided in Subdivision (a) of this Rule, shall be prosecuted on notice. The notice shall state the time and place of hearing, allowing a reasonable time for the preparation of the defense, and shall state the essential facts constituting the criminal contempt charged and describe it as such. The notice shall be given orally by the judge in open court in the presence of the defendant or, on application of the prosecuting attorney or of an attorney appointed by the court for that purpose, by an order to show cause or an order of arrest. The defendant is entitled to a trial by jury as provided in Rule 23(a). He is entitled to release from custody as provided in Rule 46. If the contempt charged involves disrespect to or criticism of a judge, that judge is disqualified from presiding at the trial or hearing except with the defendant's consent. Upon a verdict or finding of guilt, the court shall enter an order fixing the punishment."
[2]  N.D.C.C. § 27-10-04, provides:

"27-10-04. Penalty for civil contemptWhen party injured indemnified instead of fine being imposed.Any person guilty of a civil contempt punishable by a court of record of this state may be punished by a fine of not more than two hundred fifty dollars over and above the costs and expenses of the proceedings therein, or by imprisonment in the county jail for a reasonable time, not exceeding six months, and until the fine, if any, is paid, or by both such fine and imprisonment. However, if:
"1. An actual loss or injury has been produced to any party by the misconduct of such person, the court or judge, instead of imposing a fine upon him, shall order him to pay a sufficient sum to indemnify such party, and to satisfy the costs and expenses of such party, and in such case the payment and acceptance of such sum shall be an absolute bar to any action by the aggrieved party to recover damages for such loss or injury; or
"2. The misconduct proved consists of an omission to perform an act or duty which it is yet in the power of such person to perform, he shall be imprisoned only until he has performed it and paid any fine imposed." [Emphasis added.]
