In all cases where a tenant becomes insolvent and any assignment for the benefit of creditors is executed, or a receiver is legally appointed, or bankruptcy or other insolvency proceedings are instituted, either by or against the tenant, covering property upon the demised premises which is liable to distress by the landlord for rent, the landlord shall be first entitled to receive, out of the proceeds of the sale of the property by the legal representative of the tenant, any sum due the landlord for rent of the premises at the time of the institution of the receivership, bankruptcy or insolvency proceedings, not exceeding six months' rent. If the proceeds of the sale by the legal representative of the tenant are insufficient to pay the landlord and the costs of the insolvency proceedings, the landlord shall be entitled to receive the proceeds of the sale after deducting an amount equal to such costs as the landlord would be liable to pay in case of a sale under distress. Nothing in this act [section] shall be construed to deprive any person of preference for wages now provided by law in any insolvency or receivership proceedings.
NMS § 48-3-6