
75 N.W.2d 753 (1956)
Matter of Esther E. KRAMER, a Neglected and Delinquent Minor Under the Age of Eighteen Years.
STATE of North Dakota, Plaintiff and Respondent,
v.
Adolph KRAMER, Defendant and Appellant.
No. 7562.
Supreme Court of North Dakota.
March 22, 1956.
*754 Aloys Wartner, Jr., Harvey; Cupler, Tenneson, Serkland & Leahy, Fargo, for defendant and appellant.
Leslie R. Burgum, Atty. Gen., Samuel D. Krause, State's Atty., Fessenden, for plaintiff and respondent.
JOHNSON, Judge.
The defendant, Adolph Kramer, appeals from a judgment convicting him of criminal *755 contempt. He was sentenced to imprisonment in the county jail of Wells County, North Dakota, for a period of thirty days and fined $250.
On March 24, 1955, the juvenile commissioner of the district court of the Fourth Judicial District issued a summons upon a petition entitled: "In the matter of Esther E. Kramer, a neglected and delinquent minor", directed to her and her father and mother, William and Christina Kramer, for a hearing on the petition on April 1, 1955, in the City of Fessenden, North Dakota. The hearing was held pursuant to the summons upon the petition and the juvenile court took full custody of Esther E. Kramer until "she shall have attained * * * twenty-one years." The court placed her in the temporary custody of the Florence Crittenden Home at Fargo, North Dakota.
The appellant in this court, Adolph Kramer, was not a party to the juvenile proceedings, nor was he served with summons therein. He had no notice thereof.
It was within the power of the court under the statute to require his appearance if the court deemed that necessary.
"A summons may be issued requiring the appearance of any other person whose presence, in the opinion of the judge, is necessary." Section 27-1614, NDRC 1943.
On April 1, 1955, and as a result of the juvenile hearing in this matter, the court issued a "Restraining Order as to Adolph Kramer" in which he was:
"* * * enjoined and restrained from interviewing, communicating with or talking to the said Esther E. Kramer, or going to the place where she might be confined, either in the Florence Crittenden Home in Fargo, North Dakota, or in any hospital in said city, or at any other place whatsoever, and from entering the premises of the said Florence Crittenden Home during the presence there of the said Esther E. Kramer, or of molesting, annoying, or talking with her in any manner or form, until further order of this court."
A copy of this order was served upon Adolph Kramer in the City of Fargo, North Dakota, on the 5th day of April, 1955. Adolph Kramer disregarded the order and contacted and communicated with Esther E. Kramer.
On August 24, 1955, the State's Attorney of Wells County, in an action entitled in the juvenile proceedings against Esther E. Kramer in the name of the "State of North Dakota, plaintiff, v. Adolph Kramer, defendant", made a complaint setting forth facts of alleged violations by Adolph Kramer of the court's restraining order and directing twenty-eight interrogatories to him. He refused to answer the interrogatories. The Honorable H. E. Rittgers, Judge of the District Court of the Fourth Judicial District, had, the previous day, issued a warrant of attachment directed to the sheriff of Wells County, North Dakota, to apprehend Adolph Kramer and bring him before the court on the 24th day of August 1955, at 10:00 a. m., in the courthouse in the City of Fessenden, Wells County, North Dakota. Adolph Kramer was taken into custody by virtue of the warrant of attachment and appeared before the court on the 24th of August 1955. He requested a continuance of the hearing to September 13, 1955 at 10:00 a. m. Before the court would consider the granting of his request or motion, it asked him to enter a plea to the warrant of attachment. He entered a plea of not guilty and was released on bond. On September 13, 1955, the defendant appeared and moved to quash the warrant and dismiss the complaint on two grounds:
"1. The complaint and affidavit in this action and the original files and records in the matter of Esther E. Kramer, a neglected and delinquent minor under the age of eighteen years, affirmatively shows that the Court did not obtain jurisdiction over the person of the defendant, and any order issued in the matter of Esther E. Kramer as against Adolph Kramer is therefore void and of no force and effect.

*756 "2. That the moving papers do not state a cause of action for civil contempt against this defendant."
The defendant was found guilty and judgment was entered. He specifies as errors the court's refusal to dismiss the complaint and to grant the motion quashing the warrant of attachment, assuming jurisdiction over his person, and finding and adjudging him guilty of contempt.
While Section 27-1008, NDRC 1943, provides:
"* * * If an attachment is issued pursuant to section 27-1007, it shall be deemed an original special proceeding by the state as plaintiff against the accused as defendant";
it has been held that it is not wholly an independent proceeding.
"While, as appellant contends, a criminal contempt proceedings wherein a warrant of attachment is issued is an original special proceeding under the provisions of section 7555, Rev.Codes 1905, [now Section 27-1008, NDRC 1943], it cannot be correctly said to be wholly an independent proceeding, as it grows out of and is, to a certain extent, connected with the proceedings in the main action. It is only by virtue of the proceedings in the main action that this special proceeding can originate. It is dependent for its foundation upon the proceedings in the main action and the violation of the injunctional order therein issued. The essence of the contempt consists in the violation of the mandate of the judgment in the main action." State v. Heiser, 20 N.D. 357, 364, 127 N.W. 72, 75.
The validity of the conviction for criminal contempt in this action, therefore, is dependent not merely upon the hearing held in the contempt proceedings, but upon the right and power of the court to issue a restraining order in the juvenile proceedings concerning Esther E. Kramer, to which the defendant and appellant was not a party, nor served with any process, so as to bind him to obedience to its mandates.
"Acts Punishable as Criminal Contempts by Courts of Record. A court of record of this state may punish as for a criminal contempt any person guilty of any: * * *
"3. Willful disobedience of any process or order lawfully issued or made by it;
"4. Resistance willfully offered to the lawful order or process of the court; * * *." (Emphasis supplied.) Section 27-1001, NDRC 1943.
The question here presented is whether or not the court in the juvenile proceedings had jurisdiction to issue a restraining order affecting the rights of Adolph Kramer. He contends that the order was void. If the court had no jurisdiction over the person of Adolph Kramer, the issuance of the restraining order, insofar as it attempted to bind him or restrict his actions, was a nullity and void. The rule may be said to be firmly established that a court does not possess the right or power to punish as for contempt a disregard or violation of its order or decree which it has rendered without jurisdiction over the subject matter or the parties. Lack of such jurisdiction or power may, therefore, be raised by the person charged with contempt for violation of the order or decree in a collateral proceedings on appeal from the judgment of conviction for contempt. Forman v. Healey, 11 N.D. 563, 93 N.W. 866; State ex rel. Register v. McGahey, 12 N.D. 535, 97 N.W. 865, 1 Ann.Cas. 650; Kelsch v. Dickson, 71 N.D. 430, 1 N.W.2d 347; Hodous v. Hodous, 76 N.D. 392, 36 N.W.2d 554, 559, 12 A.L.R.2d 1051. In this last case the court said:
"The failure of a party to obey an order that is void for want of authority in the court to issue it is not punishable as a contempt. Forman v. Healey, [supra], State ex rel. Register v. McGahey, [supra]; 12 Am.Juris, Contempt, Sec. 24; 17 C.J.S., Contempt, § 14."
*757 Appeal from conviction of criminal or civil contempt is provided by statute. Section 27-1024, NDRC 1943.
We must next determine whether the restraining order involved here was void or merely erroneous. The rule stated does not apply in a case where the court has jurisdiction of the subject matter and the parties but has issued an erroneous order. Hodous v. Hodous, supra. In order to punish for contempt the court must have jurisdiction over the subject matter and the parties. In the case at bar the court had jurisdiction of the subject matter in the juvenile hearing, but it did not have jurisdiction over the person of Adolph Kramer in that hearing. Disobedience of a court order, entered without an opportunity for hearing, does not constitute contempt, since such order has no validity whatsoever. 17 C.J.S., Contempt, § 14, p. 21; Ex parte Irwin, 320 Mo. 20, 6 S.W.2d 597. Judicial proceedings are not valid unless they accord the parties thereto due process of law. Judgment can be lawfully rendered only after hearing and trial. All judicial proceedings without such hearing are invalid and without binding force and effect. Ex parte Wall, 107 U.S. 265, 2 S.Ct. 569, 27 L.Ed. 552; Hovey v. Elliott, 167 U.S. 409, 17 S.Ct. 841, 42 L.Ed. 215. In Ex parte Irwin, supra [320 Mo. 20, 6 S.W.2d 600], the court said:
"Unless the order of the Cole County circuit court here under review was entered after according to petitioners their day in court and an opportunity to be heard in the manner and under the safeguards laid down in the state and Federal Constitutions, such order had no validity and petitioners could not lawfully be adjudged in contempt of court after disobeying such order."
The fact that a person charged with contempt for violation of an order was not a party to the proceedings in which the order was issued has been regarded as a ground for absolving him of the charge of contempt on the ground that as to such person the order was void for lack of jurisdiction or power in the court. Ex parte Widber, 91 Cal. 367, 27 P. 733; People ex rel. Pomeranz v. District Court, 74 Colo. 58, 218 P. 742; McKinney v. Frankfort & State Line R. Co., 140 Ind. 95, 38 N.E. 170, 39 N.E. 500; In re Reese, C.C., 98 F. 984, affirmed 8 Cir., 107 F. 942; White v. County Court, 99 W.Va. 504, 129 S.E. 401. For other cases see AnnotationContemptDisobeying Invalid Decree, Sections 19 and 20, 12 A.L.R.2d pages 1090 and 1092.
The appellant in the proceedings here involved had no opportunity to present any evidence in the juvenile proceedings. He was not a party thereto, nor served with process therein. The restraining order deprived him of some of his personal liberty. Since the court had no jurisdiction over the person of Adolph Kramer, it could not in this manner deprive him of some of his personal liberty. The restraining order was void. The court, therefore, was without power or authority to find the appellant guilty of contempt. The judgment is reversed.
BURKE, C. J., and GRIMSON, MORRIS, and SATHRE, JJ., concur.
