OPINION
Opinion delivered by
Austin, Associate Justice.The Appellant, Kee Yazzie Mann, appealed an order of the Crownpoint District Court which held him in direct criminal contempt for disobeying a writ of habeas corpus. Appellant Mann urges reversal on two points: (1) the district court lacked venue to issue the writ of habeas corpus; and (2) the district court erred in summarily punishing him for contempt.
On March 27,1986, the mother of the child filed a petition for a writ of habeas corpus in the Crownpoint District Court. The petition alleged that Appellant Mann had refused to return his born-out-of-wedlock child to its mother following a brief visit. That same day, a writ of habeas corpus was issued commanding Appellant Mann to bring the child before the Crownpoint District Court on April 4,1985.
On April 4,1985, Appellant Mann appeared in court pro-se, and without the child. Counsel for the mother then moved to have Appellant Mann held in contempt for disobeying the court’s order to have the child before the court on that date. In response to the motion, the district judge without further hearing, found Appellant Mann guilty of interfering with judicial proceedings under the Criminal Code, 17 N.T.C. §477. The record does not show that Appellant Mann was advised of the criminal contempt charge, nor given an opportunity to explain his alleged contemptuous conduct. The record is also devoid of the facts upon which the conviction for direct criminal contempt was based. Appellant Mann was sentenced to a payment of a fine of $100.00. See JUDGMENT AND MITTIMUS, dated April 4,1985.
*126I. Venue
Appellant Mann contends that Rule 26, Navajo Rules of Civil Procedure, requires our reversal, because that rule mandates that, “an action shall be filed in the district in which any defendant resides or in which the cause of action arises.” Brief for Appellant at 1. Appellant Mann argues that at the time the petition was filed he resided in Tuba City district, and the cause of action arose in Window Rock district, because that was where the mother released custody of the child.
Jurisdiction of a court is not the same as venue of a court. Jurisdiction refers to the power of a Navajo Nation court to decide a case on its merits, while venue refers to the district in which the case may be heard. Venue is procedural and not jurisdictional. See Lynch v. Lynch, 3 Nav. R. 219 (Window Rock D. Ct. 1982). Reversals are appropriate where a district court adjudicates a matter over which it lacked jurisdiction.
Venue is a privilege asserted by the party in whose favor it runs to have the case tried in a convenient forum. Venue is waived if the party who holds the privilege fails to timely object to venue in the district in which the suit had been brought. Appellant Mann’s reliance on Rule 26, Navajo Rules of Civil Procedure, is proper, but he has failed to show that he made a timely objection to venue in the Crownpoint District Court. The record shows that Appellant Mann first raised the venue issue in his motion for reconsideration of the order adjudging him in contempt. By then, the circumstances resulting in the issuance of the writ of habeas corpus had been resolved, and the case had been dismissed. We hold that Appellant Mann has failed to timely object to venue in the Crownpoint District Court, thereby resulting in a waiver of his venue privilege.
II. Contempt
Navajo Nation courts have inherent power to punish for contempt of their authority and to coerce compliance with their orders. In the Matter of Summary Contempt of: Leonard R. Tuchawena, 2 Nav. R. 85 (1979); In the Matter of Contempt of: Arnold Sells, 5 Nav. R. 37 (1985); See also Navajo Nation v. Davis, 3 Nav. R. 248 (Window Rock D. Ct. 1982). A failure to obey a writ of habeas corpus is contemptuous behavior punishable by the court. The power of Navajo courts to punish for contempt must be exercised within the bounds of due process embodied in the Indian Civil Rights Act, 25 U.S.C. §1302(8) (1968), and the Navajo Bill of Rights, 1 N.T.C. §8 (1967) (current version at 1 N.T.C. §3 (1986)).
Contempts are either civil or criminal, and either direct or indirect. In the Matter of Summary Contempt of: Leonard R. Tuchawena, 2 Nav. R. *12785 (1979); Navajo Nation v. Davis, 3 Nav. R. 248 (Window Rock D. Ct. 1982). The purpose for which the court exercises its contempt powers will determine whether the contempt is civil or criminal. Matter of Klecan, 93 N.M. 637, 603 P. 2d 1094 (1979); Perry v. O’Donnell, 759 F. 2d 702 (9th Cir. 1985). Thus civil contempt proceedings are used to preserve and enforce the rights of litigants, and to compel obedience to the orders, writs, mandates and decrees of the court. Criminal contempt proceedings are used to preserve the authority and vindicate the dignity of the court. Matter of Klecan, 93 N.M. 637, 603 P. 2d 1094 (1979); accord Hing. v. Thurston, 101 Ariz. 92, 416 P. 2d 416 (1966).
Direct contempts are those contemptuous acts committed in the presence of the judge, while indirect contempts are those contemptuous acts committed outside the presence of the judge. In the Matter of Summary Contempt of: Leonard R. Tuchawena, 2 Nav. R. 85, 87 (1979); Matter of Klecan, 93 N.M. 637, 603 P. 2d 1094 (1979); Hing v. Thurston, 101 Ariz. 92, 416 P. 2d 416 (1966). The direct-indirect distinction is important for purposes of procedure. The court can dispose of a direct contempt summarily, while it must hold a hearing if the contempt is indirect. In the Matter of Summary Contempt of: Leonard R. Tuchawena, 2 Nav. R. 85 (1979).
The record shows that Appellant Mann was charged with direct criminal contempt for his disobedience of the writ of habeas corpus. The issue of whether the judge properly classified the contempt as criminal was not raised. Nonetheless, our judges must have discretion to proceed with a contempt charge in a manner consistent with the “purpose” rule that we have adopted above. Cf. In the Matter of Summary Contempt of: Leonard R. Tuchawena, 2 Nav. R. 85 (1979) (district judges have discretion to determine what acts constitute contempt).
Judges sometimes find it difficult to make the direct-indirect distinction. Our opinion is that if the judge must rely upon facts beyond his knowledge, or upon the confession of the contemnor, or upon the testimony of others to ascertain facts necessary to determine the contempt, then the contempt is indirect. In a case where it is difficult to determine whether the contempt is direct or indirect, then justice is better served if the contempt is adjudicated as indirect.
In this case, Appellant Mann’s disobedience of a valid court order is indirect contempt. The judge lacked personal knowledge of the facts which would show why the child was not brought before the court. It is unlikely that Appellant Mann can be convicted of criminal contempt without either his confession or the testimony of others. We have also said that a failure to obey a court order is indirect contempt. In the Matter of Summary Contempt of: Leonard R. Tuchawena, 2 Nav. R. 85, 87 (1979).
*128Punishment for contempt, as in this case, usually results in loss of property or liberty. It is imperative then that Navajo courts comply with due process in contempt proceedings. A person alleged to be in indirect civil or criminal contempt of court must be notified of the charges, have a right to be represented by counsel, have a reasonable time to prepare a defense, and have an opportunity to be heard. The alleged contemnor must have their day in court. The rules of criminal procedure are also applicable to indirect criminal contempt proceedings.
A judge can punish summarily if the contemptuous behavior occurred before the judge. Summary punishment is appropriate whether the contempt is denoted civil or criminal. However, our opinion is that Navajo courts must still afford due process protections in direct contempt proceedings. The judge must advise the contemnor of the charges and give the contemnor an opportunity to explain the contemptuous conduct. The order of contempt must show that the judge saw or heard the conduct constituting the contempt and that the contempt was committed in the presence of the court. The order must also state the facts constituting the contempt and the punishment imposed.
We have just said that Appellant Mann’s contemptuous conduct is indirect. Before Appellant Mann can be convicted of indirect criminal contempt, he must have been afforded a hearing which complied with due process. The record reflects that Appellant Mann was not given a hearing. Therefore his rights to due process have been violated.
In comparison, had the matter been a direct criminal contempt, then the court must still afford Appellant Mann with due process. The record does not show that Appellant Mann was given notice of the charges, or even allowed an opportunity to explain his conduct. The record is also devoid of facts which would support Appellant Mann’s conviction of criminal contempt.
We hold that Appellant Mann’s right to due process was violated when he was convicted of contempt without being afforded a hearing. We have no choice but to reverse and dismiss the district court order adjudging Appellant Mann in direct criminal contempt of court. Whatever fine Appellant Mann has paid to the court shall be returned, and the district court record shall reflect a dismissal.
Chief Justice Tso and Associate Justice Bluehouse concurred.