A magistrate has jurisdiction to punish for contempt only for disorderly behavior or breach of the peace tending to interrupt or disturb a judicial proceeding in progress before the magistrate or for disobedience of any lawful order or process of his court. No person shall be punished for contempt of the magistrate court until given an opportunity to be heard in his defense. Any person convicted under this section may appeal to the district court in the same manner as in other criminal actions in the magistrate court.
NMS § 35-3-9