N.M. Stat. § 60-13-30
Suit by contractor for compensation; pleading and proof
of license.
A. No contractor shall act as agent or bring or maintain any action in any court of
the state for the collection of compensation for the performance of any act for which a
license is required by the Construction Industries Licensing Act without alleging and
proving that such contractor was a duly licensed contractor at the time the alleged
cause of action arose.
B. Any contractor operating without a license as required by the Construction
Industries Licensing Act shall have no right to file or claim any mechanic's lien as now
provided by law.