LARAMIE, Wyo. -- Brett Smith ran for two touchdowns, both in the fourth quarter, and passed for another, leading Wyoming past New Mexico 38-31 on Saturday.
Smith rushed for 138 yards, scoring on runs of 3 and 48 yards, and passed for another 247.
Shaun Wick rushed for 116 yards and two TDs for Wyoming (4-2, 2-0).
Cole Gautsche led New Mexico (2-4, 0-2) with 113 rushing yards and a touchdown. He also passed for 156 yards and a TD. Kasey Carrier rushed 104 yards for the Lobos.
New Mexico, which entered the game averaging 367.8 rushing yards a game -- tops among major colleges -- finished with 257.
Wyoming scored on three of its first four possessions for a 21-0 lead, but the Lobos fought back, tying the game 24-24 early in the fourth quarter.
Gautsche led the comeback with a 49-yard TD run and a 24-yard TD pass to Carrier.
But Smith capped off an 11-play, 75-yard drive with a 3-yard TD run to put Wyoming ahead again 31-24 with 10:34 left.
On New Mexico's ensuing possession, Jesse Sampson intercepted a pass by Gautsche, setting up Wyoming's offense at the Lobos 48-yard line.
The interception was the third turnover on the day by the Lobos. New Mexico saw two promising drives in the first quarter stopped by fumbles. The Lobos have fumbled the ball 11 times this year, losing six.
On the next play, Smith went around the right side and scampered untouched 48 yards to put the Cowboys up 38-24.
New Mexico scored once more on a 23-yard pass from David Veba, who took over at quarterback when Gautsche suffered a leg injury, to Marquis Bundy with 1:53 remaining.
Wyoming recovered the onside kick and ran the clock out.