
240 N.W.2d 862 (1976)
Ralph R. LePERA, Appellant,
v.
Leo SNIDER, Sheriff, Morton County Jail, and William Hodny, District Judge, Appellees.
Cr. No. 533.
Supreme Court of North Dakota.
April 5, 1976.
*864 Lundberg, Nodland & Schulz, Bismarck, for appellant; argued by Irvin B. Nodland, Bismarck.
Richard L. Schnell, States Atty., Mandan, for appellee Leo Snider.
PEDERSON, Justice.
As described in the appellant's notice of appeal, this is an appeal pursuant to Section 27-10-24, NDCC, from an order judging him in contempt, from an amended order punishing him for contempt, and from an order denying his petition for a writ of habeas corpus.
Ralph R. LePera, an attorney-at-law licensed to practice in the courts of this State, represented a defendant in a criminal case in the district court in Morton County. The case went to the jury at approximately 3:30 p. m. on July 31, 1975, and all attorneys were directed by the court to leave a telephone number at which they could be reached. Mr. LePera left a number with the bailiff, which was for the United Tribes Training Center where he maintains his office.
At about 8:20 p. m. the jury indicated that it was ready to present its verdict so the clerk telephoned the United Tribes Training Center, using the number left by Mr. LePera, and was told that "Mr. LePera isn't in, you will have to call back tomorrow." Other efforts were made by the State's Attorney and others to reach Mr. LePera but all were unsuccessful.
At approximately 9:25 p. m., Mr. LePera arrived at the courtroom and the following exchange took place on the record:
"THE COURT: Mr. LePera has just entered the room. It is now 9:25.
"Mr. LePera, at the conclusion of the trial I instructed you, along with the other attorneys, to leave your current location phone number. You left one phone number which we have attempted to reach you at with no success. For that reason
"MR. LEPERA: Would you like me to explain?
"THE COURT: Yes.
"MR. LEPERA: I left that location and then went over to consult with a Mr. Tilsen, who is located at the Fleck House Motel, and it took me approximately fifteen minutes to get from the telephone number to the Fleck House, and I called from the Fleck House to this building here to inform the Court where I had changed this number to and there was no answer. I then immediately got in my car and drove over here and I had some problems because you can't get across the bridge, so from two ways I had to wind around the park and I got over here.[1]
"THE COURT: Mr. LePera, I find you in contempt of this Court, a contempt having been committed in the immediate presence and in view of the Court. The basis of the finding of contempt being you did not leave your current location phone number as instructed. You *865 changed locations. We have been trying to reach you for over an hour. One of the jurors has a problem with her child. They have been in for over an hour.
"It will be the judgment of this Court that you be sentenced to serve two days in the Morton County Jail, commencing immediately upon the reception of the Jury verdict.
"You have also been late other times. Some excuses have been acceptable and others have not been extended. This Court has run out of patience. I am finding you in contempt under Section 12.1-10-01(b), which reads as follows:
`A court of this state has power to punish for contempt of its authority only for the following offenses:
b. Misbehavior of any of its officers in their official transactions.'
"We will be adjourned. We will retire to the courtroom."
Thereafter the district judge executed the following order:
"WHEREAS Ralph LePera did fail to keep the Court notified of his current location phone number during the time that the Jury was deliberating the case so as to be available at the time the verdict was received in violation of the Court's verbal instruction given at the conclusion of the trial and the reception of the verdict having been held up by his absence for slightly more than an hour, the Court does find that he has committed a criminal contempt in the immediate view and presence of the undersigned and violated Section 12.1-10-01 [subd. 1] (c) N.D.C.C.
"IT IS THEREFORE ORDERED that he be imprisoned in the Morton County Jail for a period of two days.
"Dated this 31st day of July, 1975, at Mandan, North Dakota."
Mr. LePera was committed to the Morton County jail and the following day he made application for a writ of habeas corpus from the Supreme Court. This court directed Judge Graff of the Burleigh County District Court to assume jurisdiction over the application and conduct a hearing thereon. Judge Graff directed the release of Mr. LePera, conducted an evidentiary hearing on August 7, and thereafter denied the writ of habeas corpus and remanded Mr. LePera to the sheriff of Morton County to serve the remainder of his jail term.
Mr. LePera then appeared before Judge Hodny of the Morton County District Court, made an apology to the court for the inconvenience he had caused, whereupon the court stated:
"Your apology is accepted.
"Exercising the court's prior proposal, your sentence will be reduced to a deferred imposition of sentence upon the condition you do not appear tardy in the Morton County Court for six months without a valid excuse."
The following day, August 8, the court's order was reduced to writing, adding thereto provisions that after six months, upon application, the court would dismiss the matter and expunge the record of any and all contempt.
Although Mr. LePera is now apparently eligible under the deferred sentence to have the contempt expunged from the record, he has elected to appeal to this court and ask that he be exonerated.
Section 7.1 of Standards Relating to The Function of the Trial Judge, American Bar Association Project on Standards for Criminal Justice, Approved Draft, 1972, provides:
"The court has the inherent power to punish any contempt in order to protect the rights of the defendant and the interests of the public by assuring that the administration of criminal justice shall not be thwarted. The trial judge has the power to cite and, if necessary, punish summarily anyone who, in his presence in open court, willfully obstructs the course of criminal proceedings."
It is apparent that the courts of this State have statutory as well as inherent power to punish for contempt, and to do so summarily when contempts are committed in the presence of the court which would otherwise tend to disrupt the administration of justice.

*866 "* * * Many of the powers which the court must exercise in keeping its house in order are necessarily implied. * * *
"Perhaps the most important of the inherent powers of a court is the power to punish for contempt."
Problems and New Developments in Contempt, 43 N.D.L.Rev. 237 (Burdick, Keller and Sutherland).
Rule 42(a), N.D.R.Crim.P., provides:
"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."
See also, Section 27-10-06, NDCC (1975 Supp.).
Section 7.2 of the Standards Relating to The Function of the Trial Judge, supra, provides:
"No sanction other than censure should be imposed by the trial judge unless
(i) it is clear from the identity of the offender and the character of his acts that disruptive conduct was willfully contemptuous, or
(ii) the conduct warranting the sanction was preceded by a clear warning that the conduct is impermissible and that specified sanctions may be imposed for its repetition."
The United States Supreme Court said in the case of Re Oliver, 333 U.S. 257, 275-276, 68 S.Ct. 499, 509, 92 L.Ed. 682 (1948):
"If some essential elements of the offense are not personally observed by the judge, so that he must depend upon statements made by others for his knowledge about these essential elements, due process requires * * * that the accused be accorded notice and a fair hearing * * *."
Section 12.1-10-01(1), NDCC, reads in full as follows:
"1. A court of this state has power to punish for contempt of its authority only for the following offenses:
a. Misbehavior of any person in its presence or so near thereto as to obstruct the administration of justice;
b. Misbehavior of any of its officers in their official transactions; or
c. Disobedience or resistance to its lawful writ, process, order, rule, decree, or command."
Our examination of the facts in the instant case indicates that not all evidence upon which the contempt citation in this case is based was accomplished within the sight and direct knowledge of the judge. The judge stressed that it was not LePera's absence or tardiness but his failure to leave an appropriate telephone number which constituted the basis for the contempt. LePera left the telephone number with the bailiff, not with the judge; the telephone call was made to that number by the clerk of the district court, and others, not by the judge. Under the circumstances, the summary action was improper and the order adjudging contempt, as well as the order of punishment, is hereby reversed and the case is remanded for a new trial before another judge.
This court does not mean to say that Mr. LePera must be exonerated nor do we mean to say that he should not have been censured and required to apologize. However, where the elements constituting the contempt are dependent upon statements made by the bailiff and the clerk and not within the direct knowledge of the trial court, summary proceedings should not be utilized unless the court intends to warn, admonish, or censure only.
While the differences between civil and criminal contempts are not significant to the issues before us in this case, proper classification is sometimes important. See State v. Stokes, 240 N.W.2d 867 (N.D. 1976), decided by this court today.
The trial court labeled this a criminal contempt and charged it under Section *867 12.1-10-01, NDCC. 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.
Mr. LePera's appeal from the denial of the writ of habeas corpus is dismissed.
"No rule of practice is better settled in this jurisdiction than that a final order in a habeas corpus proceeding is not appealable."

Ex parte Simonson, 54 N.D. 164, 209 N.W. 211 (1926). See also, syllabus 1 of State v. District Court in and for Burleigh County, 64 N.D. 399, 253 N.W. 744 (1934).
However, the right to file an application for an original writ of habeas corpus in this court provides a remedy equivalent to an appeal from the order of the district court. See McGuire v. Warden, 229 N.W.2d 211 (N.D.1975).
Accordingly, the orders adjudging contempt and ordering punishment and the amended order imposing probation issued by Judge Hodny are reversed and the case is remanded for new trial.
ERICKSTAD, C. J., and VOGEL, PAULSON and SAND, JJ., concur.
NOTES
[1]  A much fuller explanation of Mr. LePera's difficulties on the evening of July 31, 1975, was made at the hearing on his application for a writ of habeas corpus but is not pertinent to our disposition of this case.
