Kendall Williams led New Mexico (20-4, 6-2 Mountain West) with 10 points while Drew Gordon had 13 rebounds and Hardeman grabbed eight.
Francisco Cruz scored 14 for the Cowboys (18-6, 4-4), who only had four players score.
The teams combined to hit just 30 field goals and shot a combined 31.6 percent from the field.
The game turned on the run that Hardeman started with the Lobos trailing 25-21. Jamal Fenton’s deep 3-pointer at the 9:40 mark capped the surge, leaving New Mexico with a 34-27 lead that it would not relinquish the rest of the game.