UCLA (3-2, 1-1 Pac-12) came into the game as the No. 1 pass offense in the nation averaging almost 453 yards per game, while the Buffaloes (3-2, 0-2 Pac-12) came in ranked in the top three in the Pac-12 in passing defense.
When it came down to crunch time, it was the Bruins' offense that won the battle and clinched the game as UCLA ended a two-game skid after losing to Memphis and Stanford.
With UCLA nursing a 24-20 lead, the defense stopped a Colorado drive deep in Bruins' territory. Colorado had to settle for a James Stefanou 33-yard field goal to close the deficit to 24-23 with 6:46 remaining.
The Bruins started their final crucial drive from their own 8-yard line. After Rosen was sacked for a 1-yard loss, he fired a strike from the shadows of his own goal line to Darren Andrews for an 18-yard gain, giving the Bruins some breathing room.
From there, Rosen and the Bruins drove to Buffaloes' 14-yard line. Kicker JJ Molson made good on a 31-yard attempt with 26 seconds left to complete the 15-play, 79-yard drive.
The Buffaloes started their final drive from their 28-yard line without any timeouts. Steve Montez completed a 31-yard strike to Jay McIntyre to the UCLA 42-yard line.
A quick out for five yards set up Montez's Hail Mary, which sailed out of the end zone.
Montez finished 17 of 36 for 243 yards and a score.
A trick play came back to haunt Colorado as UCLA led 14-10 at halftime after Colorado's fake field-goal attempt backfired in the second quarter.
Rosen and Montez had efficient first halves with the Buffs' quarterback completing 11 of 18 for 139 yards and one touchdown. Rosen was 12 of 22 for 169 yards and a touchdown.
On their first possession, the Buffaloes marched 63 yards in 10 plays to score the first touchdown. Montez capped the drive with a 21-yard strike to Phillip Lindsay.
Rosen guided the Bruins on a nine-play, 75-yard drive to tie the game when he found Austin Roberts from 12 yards out.
Stefanou's 33-yard field goal put Colorado up 10-7, but Rosen and the Bruins had an answer when Jalin Starks plunged from a yard to put UCLA on top 14-10.