San Diego State (3-5, 2-2 Mountain West) got a 27-yard punt return from Brent Swain to start the Aztecs' winning drive at the Wyoming 38-yard line. O'Connell found Brown for the winning score on third-and-13 at the 1:06 mark that put the Aztecs ahead for the first time in the game.
Karsten Sween threw two first-half touchdown passes to Michael Ford for Wyoming (6-3, 3-2), which led 21-0 in the second quarter. Sandwiched in between Sween's TD passes of 19 and 30 yards to Ford was Quincy Rogers' 80-yard interception return for a touchdown late in the first quarter.
The Aztecs, who cut the halftime lead to 21-7 on O'Connell's 13-yard scoring pass to Chaz Schilens with 13 seconds left, scored a pair of touchdowns in less than five minutes in the third quarter to pull to within one, 21-20.
O'Connell ran 29 yards for a TD to trim Wyoming's lead to 21-13 midway through the third quarter. O'Connell, who already holds the school record for career rushing yards by a quarterback, broke the career mark for rushing touchdowns by a quarterback with 15.
After San Diego State's extra point attempt was blocked following O'Connell's touchdown, Brandon Sullivan scored from 29 yards out at the 2:57 mark to narrow Wyoming's lead to 21-20. Billy Vinnedge put Wyoming up 24-20 with a 44-yard field goal with 11:38 to go in the game.
O'Connell finished 20-of-44 passing for 249 yards.