Wyoming saw its chance to beat another top-25 team sail away on an errant full-court inbounds pass with 8 seconds left.
Trailing 61-59, Wyoming forward Leonard Washington launched the pass over everyone and out of bounds on the other side of the court. Hugh Greenwood, who had just put the Lobos ahead with a jumper, was fouled on their ensuing possession and sank two free throws, giving New Mexico a 63-59 win over the Cowboys.
"We just didn't connect on that," Wyoming coach Larry Shyatt said of the turnover at the end.
Shyatt said the inbounds play was designed to get the ball first to guard Riley Grabau and the full-court pass was a second option.
Grabau said he was at fault for the play by not getting open.
"I didn't go to the ball for him (Washington), and he had to throw a deep pass," he said. "That should have been my turnover."
It was the third straight loss for the Cowboys (15-5, 2-5 Mountain West), who had defeated two top-25 teams at home this season.
Cameron Bairstow led New Mexico with 17 points. Greenwood had 13 points, Kendall Williams 12 and Alex Kirk 10 for the Lobos (18-3, 5-1).
New Mexico has won 10 of its last 12 games against Wyoming and five of the last six in Laramie.
Wyoming was led by Derrious Gilmore's 15 points, all on 3-pointers. Riley Grabau and Leonard Washington had 11 points apiece. Wyoming shot 12 for 22 on 3s, but New Mexico dominated play in the paint — outscoring the Cowboys 28-12 inside and outrebounding them 35-23.
Wyoming's two inside threats — Washington and Larry Nance Jr. — were a combined 7 for 21 from the field.
"They wall up really well with their hands up and we just didn't finish inside," Shyatt said.
Wyoming led 28-27 at the half thanks primarily to its 7-of-10 shooting from 3-point range. Gilmore hit three 3s, and Grabau two.
The Cowboys started the second half with two free throws by Nance for a 30-27 lead, but the Lobos went on an 8-0 run for a five-point advantage.
New Mexico went up by nine points in the second half before Wyoming tied the score at 59-all on Grabau's 3-pointer with 23 seconds left.
But Wyoming wouldn't get another point as Greenwood finished the game's scoring with his four points.
"Hugh Greenwood has made big shot after big shot," New Mexico coach Steve Alford said. "Hugh's had games where he's not made anything and yet in the last 5 minutes he'll come up with the big shot or the big free throw and today I thought he was really good throughout."