PALO ALTO -- The hopping and bopping on the UCLA sideline began as soon as the third quarter ended.
Stanford players held off on their dancing until the end.
When a 52-yard field-goal attempt by UCLA kicker Ka'imi Fairbairn came up short with 34 seconds left, so had the Bruins.
Moments later, Cardinal players exploded from the sideline and all that was left for the Bruins was a long walk out the tunnel, with Stanford fans tossing rose petals on them. Stanford's 27-24 victory in the Pac-12 championship game on a drizzly Friday night in Stanford Stadium meant the Rose Bowl for the Cardinal (11-2). It meant pain for the Bruins.
"If we had won, I'd be happy; we lost and I'm sad," defensive end Cassius Marsh said. "That's plain and simple. It breaks my heart."
The 17th-ranked Bruins (9-3) will get a bowl bid Sunday, probably the Alamo Bowl or Holiday Bowl, but were left knowing they were 15 minutes from accomplishing more.
"I don't want to say I thought we had it, you have to play through the game," cornerback Aaron Hester said. "But it was there for us."
It was finally there for the eighth-ranked Cardinal, which had its Rose Bowl path blocked by Oregon the previous two seasons.
Most ticketed Oregon and USC for the title game before the season began. That matchup was canceled two weeks ago when Stanford upset then-No. 1 Oregon and UCLA beat USC.
"We knew this season was going to come down to beating Oregon," Stanford Coach David Shaw said. "That was the key game."
There was that UCLA team too. But Stanford took care of the Bruins on back-to-back weekends. The second game, though, took a little more work.
The Cardinal cruised last week in a 35-17 victory in the Rose Bowl. But it was clear from the start Friday that this was going to be a little more difficult. The Bruins looked like a different team.
The Cardinal came into the game first in the nation against the run. Oregon's 198 yards rushing were the most Stanford had allowed this season. UCLA had 135 yards rushing after two possessions Friday and finished with 284.
Johnathan Franklin had 194 yards, including a 51-yard touchdown run that gave UCLA a 7-0 lead.
Quarterback Brett Hundley's mobility was a big difference. He seemed reluctant to run in the first meeting, but finished with 83 yards rushing Friday.
Hundley gave UCLA momentum, but he also handed it back to Stanford. Ed Reynolds intercepted a Hundley pass and returned it 80 yards to set up a one-yard touchdown run by Stepfan Taylor in the second quarter.
Instead of UCLA possibly going in for a 21-7 lead, the score was tied, 14-14.
"That was a game-changer," Shaw said.
The game winner came in the fourth quarter.
The Bruins led, 24-17, through three quarters and went into their mosh-pit dance, as they have throughout the season. The UCLA catch phrase all season has been to finish.
"We felt we controlled our destiny," UCLA defensive end Datone Jones said.
Instead, the Cardinal did.
Two plays in the fourth quarter made a difference. Stanford took a risk. UCLA took a long field-goal try.
The Cardinal, trailing by a touchdown, was faced with a third-and-15 play from the UCLA 26. Stanford could have played it safe and set up a field goal with 11 minutes left. Instead, quarterback Kevin Hogan found Drew Terrell open in the end zone behind UCLA's Sheldon Price to tie the score, 24-24.
"Kevin held the ball as long as he could to make sure the safety didn't slide over," Shaw said.
UCLA Coach Jim Mora said, "We had a breakdown at an inopportune time."
Jordan Williamson put Stanford ahead with a 36-yard field goal with 6:49 to play.
UCLA had a last chance starting with 1:34 left and lurched along, getting to the Stanford 34. On fourth and five, Mora opted for the 52-yard field goal attempt. Fairbairn had only one field goal from beyond 40 yards.
"There was the thought, to go for it, but if we didn't get it, we wouldn't have had a chance to kick the field goal," Mora said.