Any attorney or attorneys, counselor or counselors, defender or defenders whatever, in the courts of this state, who maliciously reveal the secrets of their client to the opposite party, or who, being charged with the defense of one party, and having informed himself of his cause and means of defense, shall desert him and defend the other, or who in any way whatever shall knowingly jeopardize his client in order to favor the opponent or derive some personal profit, or because greater fees have been proffered him after having been retained by his client, upon conviction of such an offense before any court whatsoever of this state, justice of the peace [magistrate court], probate judge or district court, shall be fined in a sum double the amount he may have received for the defense of the cause, and all fines that may result shall accrue one-half to the funds of the counties and the other half to the funds of the state; and upon conviction, he shall be deprived of the exercise of such office of attorney, counselor or defender.
NMS § 36-2-16