It shall be unlawful for any person, firm, corporation or association to divide with or receive from any attorney-at-law, or group of attorneys-at-law, whether practicing in this state or elsewhere, either before or after action is brought, any portion of any fee or compensation charged or received by such attorney-at-law, or any valuable consideration or reward, as an inducement for placing or in consideration of being placed in the hands of such attorney or attorneys-at-law, or in the hands of another person, firm, corporation or association, a claim or demand of any kind, for the purpose of collecting such claim or instituting an action thereon or of representing claimant in the pursuit of any civil remedy for the recovery thereof, or for the settlement or compromise thereof, whether such compromise, settlement, recovery, suit, claim, collection or demand shall be in this state or elsewhere. This paragraph [section] shall not apply to agreements between attorneys to divide compensation received in cases or matters legitimately, lawfully and properly received by them.
NMS § 36-2-31