Bairstow scored 17 points on 5 of 8 shooting and hitting 7 of 10 free throws to keep UNM in the thick of the game. Greenwood scored four of his 13 points in the final seconds to put the game away, including a jumper in the lane with nine second left to break a 59-59 tie, then hit two free throws two seconds later to seal the win for UNM.
"I thought Hugh stepped up huge tonight with huge shots," said Lobo head coach Coach Steve Alford. "I thought Cam really gave us a lift with how he shot the ball. This is a hard place to play. We knew this was going to be a struggle and a fight."
Greenwood finished with a double-double, pulling in a game-high10 rebounds.
The Lobos, who entered the game ranked 20th in the AP poll and 22nd in the Coaches poll, took a nine-point lead on a three pointer by Jamal Fenton with 6:44 left in the game. But Wyoming used three-point shooting to claw back into the game.
The Cowboys tied the game with 15 seconds left on a Riley Rabau three pointer of a UW miss following a five-second call against UNM's Tony Snell, right before the bucket.
UNM came up the court and Greenwood casually rose up in the lane and sank the jumper to give UNM the lead back at 61-59. Then Greenwood got the chance to ice the game with free throws after Leonard Washington's errant inbound pass went out of bounds.
Wyoming (15-4, 2-4 Mountain West) hit 12 of 22 three pointers (54%) in the game – almost 20 percentage points above their season average – keeping Wyoming in the game.
New Mexico (18-3, 5-1) started sluggishly, falling behind 5-0 early before responding with a 12-0 run to take a 12-5 lead 12 minutes into the game.
Wyoming gamely responded and took a 28-27 lead into halftime after a contested buzzer beater trey by Rabau following a questionable missed jumper by Alex Kirk.
Wyoming shot just 8 of 27 on shots inside the three point arc and was outrebounded 35-23. UNM also outscored the Cowboys 28-2 in the paint.
New Mexico was buoyed by a 53.8% shooting in the second half (14 of 26) and finished hitting 25 of 52 (48.1%). Kendall Williams added 12 points and six rebounds and Alex Kirk added 10 points and six rebounds for UNM.
"We knew we could come in here and separate ourselves (from the rest of the league)," said Alford. "We knew if we could give Wyoming its fifth loss and that would make it tough (on Wyoming's MW chances). We had a chance to make a statement tonight."
Wyoming got a team high 11 points from Derrious Gillmore, who scored 15 points on 5 of 7 three-point shooting. Leonard Washington and Grabau scored 11 points.
"I thought this was a pivotal game for us if we were going to have something to say (about the 2013 MW championship)," said Alford. "This gives us a chance."