If any such sheriff, after being removed as provided by law, shall attempt to exercise any of the rights or powers of said office, or shall fail or refuse to turn over the office to the person appointed to succeed him, he shall be deemed guilty of a misdemeanor, and upon conviction thereof in the district court, shall be punished by a fine not exceeding three hundred dollars [($300)], or by imprisonment not exceeding three months, in the discretion of the court before which the cause may be tried.
NMS § 4-41-4