With the victory, New Mexico keeps its hopes for its first conference championship since 1966, as the Lobos can claim the Mountain Division crown of the Mountain West Conference with two more victories.
Boise State wide receiver Thomas Sperbeck gave Bronco fans a performance for the ages, catching 20 passes for 281 yards, both school records. Brett Rypien also broke one school record with 72 passing attempts and tied another with 40 completions.
Quarterback Austin Apodaca went over the top of Boise State's secondary for several big plays and running back Jhurell Pressley paced the Lobo ground game with 132 yards.
Boise State opened the game by reaching the Lobo red zone four times, but only came away with one field goal to show for it. New Mexico scored first on a 74-yard run from Pressley, in which a replay showed Pressley stepped out of bounds, but replay officials did not overturn the onfield call of a touchdown. After the Bronco field goal, quarterback Lamar Jordan's 19-yard run put New Mexico up 14-3, a lied they took into halftime.
After a New Mexico drive in the third quarter stalled, Zach Rogers booted a 33-yard field goal to extend the lead to 17-3.
Boise State fought back, scoring one touchdown in the third quarter on a 25-yard run, then again in the fourth on an 18-yard pass from Rypien to McNichols.
But New Mexico then scored two touchdowns in 1:35 for their final points of the game. Apdoca hit Delane Hart-Johnson on an 81-yard pass and Richard McQuarley dove into the end zone on the next play as New Mexico grabbed a 24-17 lead with 13:44 remaining.
Cranston Jones intercepted a Rypien pass when it deflected off the hands of Chaz Anderson at the Boise State 30. It was the third such interception for the Lobos after hitting a Bronco receiver in the pads.
Three plays later, Teriyon Gipson dashed in from four yards out and New Mexico led 31-17 with 12:09 left.
Boise State drove inside the Lobo 30 three times without scoring, finally taking advantage of the field position with a 28-yard pass from Rypien to tight end Jake Roh with 2:16 remaining.
New Mexico recovered an onside kick attempt, but was unable to run out the clock to give Boise State one final chance.
With one second remaining, Rypien found Sperbeck, who ran over the middle of the field before lateraling the ball. The Broncos lateraled several more times before uncorking a perfect pass to Cottrell, who spurted along the east sideline past one Lobo defender at the 30 and was seemingly on his way to the end zone. But Byrd held his ground and stopped Cottrell before he could tie the game.
Boise State ran 114 offensive plays to 53 for New Mexico.
Rypien finished the game with 503 passing yards and two touchdown passes.
Boise State hosts Air Force next Friday for Senior Night in Albertsons Stadium.