
253 N.W.2d 425 (1977)
Marvin KLEIN, Petitioner,
v.
Leo SNIDER, Morton County Sheriff, Respondent.
Crim. No. 594.
Supreme Court of North Dakota.
April 29, 1977.
*426 Daniel J. Chapman, Bismarck, for petitioner.
Patrick A. Conmy, of Lundberg, Comny, Nodland, Rosenberg, Lucas & Schulz, Bismarck, for respondent.
VOGEL, Justice.
This is an original habeas corpus proceeding in which the petitioner challenges the legality of his imprisonment under a 60-day sentence for civil contempt.
The contempt proceeding was based upon a motion by the petitioner's ex-wife, supported by her affidavit, asking that petitioner be found in contempt for failing to make monthly child-support payments of $200, with arrearage of $1,150, for failure to provide health-insurance coverage for the minor child of the parties, for failure to pay $300 and $200 in attorney fees, and for failure to deliver certain personal effects to the ex-wife, all in violation of prior orders of the court.
The only authority provided by statute or rule for contempt proceedings in cases of this kind is found in Chapter 27-10, N.D. C.C. Section 27-10-07 provides that when an act punishable as a criminal or civil contempt by a court of record of this State is not committed in the immediate view and presence of the court, the court, upon being satisfied by affidavit of the commission of the offense, shall make an order requiring the accused to show cause why he should not be punished, or the court may issue a warrant of attachment to the sheriff commanding him to arrest the accused and bring him before the court. Section 27-10-08 provides that an order to show cause issued pursuant to Section 27-10-07 is equivalent to a notice of motion and that subsequent proceedings shall be taken as upon a motion made in the case. Section 27-10-13 provides that when a person appears upon the return of an order to show cause,
". . . the court, unless the accused admits the offense charged, must cause a complaint in the form of an affidavit to be filed specifying the facts and circumstances of the offense charged against him. The accused, under oath, must make written answer thereto by affidavit within such reasonable time as the court allows therefor and either party may produce affidavits or other proof contradicting or corroborating such answer. Upon the original affidavits, the answer, and subsequent proofs, the court must determine whether the accused has committed the offense charged."
*427 Section 27-10-14 authorizes the court to make a final order for punishment by fine or imprisonment, or both, if it determines that the accused has committed the offense charged.
It is to be noted that this procedure was not followed in the case before us. Instead, the proceeding was by motion. The petitioner made no objection. Such a proceeding by motion is not at all unprecedented. It was used, for example, in Thorlakson v. Wells, 207 N.W.2d 326 (N.D.1973).
We have mentioned at some length the statutory procedure for two reasons. The first is to indicate that it is preferable, if not absolutely required, and the second is that it shows quite clearly that the alleged contemnor is entitled notice, hearing, and opportunity to defend.
The proceeding in the present case was apparently intended to make use of the usual motion procedure, under Rules 7 and 43(e), N.D.R.Civ.P. The use of motion procedure in contempt proceedings is undesirable, and it has been said that,
"A proceeding to find a party in civil contempt for violation of an injunction is not within Rule 43(e) and cannot be resolved on affidavits." 9 Wright & Miller, Federal Practice & Procedure: Civil § 2416, citing Locklin v. Switzer Bros., Inc., 348 F.2d 244 (9th Cir. 1965).
In the case before us, the petitioner and his attorney appeared at the time specified in the notice of motion for the hearing. The attorney then gave to opposing counsel and the court copies of his "Return to Motion for Contempt." The Court, which had previously postponed a hearing on the matter when the attorney for the petitioner declined to proceed with only copies of the original documents, which had not yet been filed, said:
"Mr. Chapman, I see returns to motions. You may have these back. They weren't filed within the twenty-four hours[*] required by the District Court Rules. I consider you wholly in default. The last time we were here, Mr. Chapman, you didn't consent to hear the matter on copies. You raised the Rules, so I am raising the Rules also.
"Is there anything further to be said on these motions?"
When the opposing counsel stated that he considered his client's affidavit sufficient, "unless the Court would request testimony to add details to it," the Court replied, "I would contemplate something like this to be on Affidavits."
The Court then said, "Do you want to make any statements, Mr. Chapman, on anything other than the return to these? Your return isn't timely."
In the return to motion for contempt, which the Court refused to consider, because it was not filed one day in advance of the hearing, the appellant clearly raised the claim that he had ". . . not been employed and has no means with which to make the payments as set forth in the judgment." This is a legitimate and proper defense to a proceeding to hold a divorced husband in contempt for failure to make child-support payments. Thorlakson v. Wells, supra; Hodous v. Hodous, 76 N.D. 392, 36 N.W.2d 554, 12 A.L.R.2d 1051 (1949); State v. Babcock, 64 N.D. 288, 251 N.W. 849 (1933).
While counsel for the appellant might have been more specific in raising the issue in the oral statement he made to the Court after the Court refused to consider his client's belated return, we believe he did signify an intention to rely upon the defense of inability to pay when he assured the Court that there would be a reasonable effort made to "find employment."
We believe that the net effect of the refusal to consider the return of the petitioner and the statement that the Court intended to proceed on affidavits was to deprive the petitioner of his opportunity to present evidence in support of his claim of *428 inability to pay. If he were able to establish such a claim as true, it would have been a defense. We therefore feel constrained to grant the writ of habeas corpus and remand the case for consideration of the claimed defense of inability to pay.
In so doing, we can fully sympathize with the position the trial court was in and we are not critical of that court. We note (1) that the petitioner had been recalcitrant and difficult in prior proceedings before the same court; (2) that the motion to find him in contempt was accompanied by a separate motion to deprive him of visitation rights of his child; (3) that the hearing on the two motions was consolidated; (4) that both motions were discussed at the same time by the attorneys in making their statements to the court; (5) that there were ample grounds for ordering a termination of visitation rights; and (6) that the order terminating those rights was not appealed.
However, as we have indicated, the effect of the proceeding by way of motion, the refusal to consider the belated return, the indication that the hearing was on affidavits only, and the hearing of both motions together was that the appellant was deprived of an opportunity to present a defense which he had raised.
As we said in LePera v. Snider, 240 N.W.2d 862, 867 (N.D.1976),
"Both criminal and civil contempts, if they are in fact direct contempts committed in the presence of the court, are punishable summarily, and such punishment may include incarceration. See §§ 27-10-04 and 12.1-10-01, NDCC. Even in those cases which may be instituted as direct contempt, if the excuse offered relates to matters outside the knowledge of the court, due process requires that a full hearing be afforded when more than a reprimand is contemplated. Where the alleged contemptuous conduct, or a part thereof, occurred outside the presence of the trial court, the one charged should have full opportunity to explain and defend, and is entitled to a presumption of innocence. Nilva v. United States, 227 F.2d 74, reh. denied, 228 F.2d 134 (8th Cir. 1955), aff. in part and sentence vac., 352 U.S. 385, 77 S.Ct. 431, 1 L.Ed.2d 415 (1957). Circumstances may arise where summary punishment of fines and incarceration are necessary to eliminate courtroom disruption which obstructs justice. Such circumstances are missing from this case."
It is very likely that the order finding the petitioner in contempt was based in part upon evidence appropriate only to the motion to deprive him of visitation rights. The motion to find him in contempt referred only to his failures to pay over money and property, while the motion to deprive him of visitation rights referred to his refusal, for a period of months, to return the child of the parties after having custody for only a weekend. That there was confusion as to the basis for the contempt is indicated by the fact that the contempt judgment was grounded upon not only the failure to make child-support payments, but was also founded upon the removal of the child from the custody of the former wife and from the State. The latter ground was not included within the motion or the affidavit asking that the petitioner be found in contempt.
The petitioner is discharged, pending further proceedings, without prejudice to further proceedings under Chapter 27-10, N.D. C.C. The petitioner, who is on bail on a criminal charge, remains on bail and subject to prosecution on that charge.
ERICKSTAD, C. J., and SAND, PAULSON and PEDERSON, JJ., concur.
NOTES
[*]  Rule 6(d), N.D.R.Civ.P., provides, with one exception immaterial here, that "opposing affidavits may be served not later than one day before the hearing, unless the court permits them to be served at some other time."
