STANFORD, Calif. (AP)- Kevin Hogan has taken Stanford to a place Andrew Luck never could.

Hogan threw for 155 yards and a touchdown and ran for 47 yards and another score, helping the eighth-ranked Cardinal beat No. 17 UCLA 27-24 in the Pac-12 championship game Friday night. The redshirt freshman won game MVP honors to put Stanford in the Rose Bowl for the first time in more than a decade.

As a defender barreled into him, Hogan hurled a 26-yard tying touchdown to Drew Terrell on third-and-15 early in the fourth quarter. Jordan Williamson kicked his second field goal from 36 yards with 6:49 remaining for the go-ahead score to seal Stanford's first conference title since the 1999 season.Many of the sparse crowd announced at 31,622 rushed the field. Players, wearing their all-black uniforms, danced on the sideline and confetti flew from a stage erected on the field.

What a way to ring in the post-Luck Era: The Cardinal (11-2) will play the winner of the Big Ten title game between Nebraska and Wisconsin in the Rose Bowl on Jan. 1.

"Character," said Stanford's David Shaw, the Pac-12 coach of the year in his first two seasons. "Even when we don't play well, we still play hard. Our guys played with such heart. We made plays when we needed to make plays."

UCLA's Brent Hundley threw for 177 yards and a costly interception that set up a Stanford touchdown. He still almost brought the Bruins (9-4) back, but Ka'imi Fairbairn missed a 52-yard field goal wide left in the closing moments for a disappointing loss.

Hogan completed 16 of 22 passes to beat a fourth ranked opponent in his fourth straight start since unseating Josh Nunes at quarterback. After the Cardinal rolled past UCLA 35-17 last Saturday at the Rose Bowl, it took all 60 minutes for another victory in the rare rematch.

The heavy rain that pounded the Bay Area most of the day relented most of the night, and a tarp that covered the field until about 3 hours before kickoff. Scattered showers still kept the grass slightly slick.

The surface never seemed to slow down the Bruins, who ran for 284 yards behind Jonathan Franklin 194 yards on the ground. The most yards rushing Stanford allowed this season had been 198 in an overtime victory at Oregon two weeks ago.

Not matter.

The Cardinal won their seventh straight game to advance to their third different BCS bowl in as many seasons-a run that began behind coach Jim Harbaugh and Luck, the No. 1 overall pick of the Indianapolis Colts. Before that, the Cardinal had only won 10 games three times-1992, 1940, 1926-in program history.

The Bruins made the final road block more difficult than expected.

UCLA converted a pair of third downs before Franklin burst through the middle for a 51-yard touchdown. He carried safety Jordan Richards the final 5 yards into the end zone to give the Bruins a 7-0 lead on the game's opening drive.

Stanford answered in a hurry when Hogan ran 14 yards on a read-option keeper to convert a long third down, fullback Ryan Hewitt bulldozed through the line on a fourth-and-1 and Stepfan Taylor took a short pass 33 yards inches shy of the goal line. On the next play, Hogan faked a handoff and rolled untouched for the tying touchdown.

Taylor finished with 78 yards rushing to eclipse Darrin Nelson's school rushing record of 4,169. Taylor, an outgoing senior, has 4,212 for his career.

Before the Cardinal offense even found their seats on the sideline, Hundley ran 48 yards and scrambled for a 5-yard TD to put UCLA back in front, 14-7. With the Bruins about to go ahead two scores, Ed Reynolds intercepted Hundley's pass and returned it 80 yards to set up Taylor's short TD run.

Officials ruled that Reynolds, who ran three interceptions back for a touchdown this season, was tackled by Hundley short of the goal line and a replay challenge by Stanford coach David Shaw was inconclusive. Reynolds moved into a tie with Oregon State's Jordan Poyer for the Pac-12 lead with six interceptions.

Williamson kicked a 37-yard field goal as the first half expired to give Stanford a 17-14 lead. Fairbairn answered with a field goal from 31 yards on UCLA's opening drive of the second half.

Franklin capped a 12-play, 80-yard drive with a 20-yard TD run late in the third quarter. That gave the Bruins a 24-17 and put Stanford on the brink of its first home loss this season.

Instead, the Cardinal came back in impressive fashion.

Hogan heaved the long touchdown to Terrell on third down just over the cornerback's head. Terrell caught the pass in the short corner and pointed to the poncho-wearing crowd.

"We sent four verticals, it was a great job by Kevin to see the safety slide in," Shaw said. "He held it as long as he could to make sure the safety stayed inside and he got the ball outside. A great throw and great catch."

Stanford stuffed UCLA three-and-out and Terrell returned the punt 18 yards to the Bruins 43. That set up Williamson's winning 36-yard field goal with 6:49 remaining.

Stanford stopped UCLA again, and Hogan ran for 11 yards on third-and-2 to help Stanford drain the clock some more before punting back to the Bruins one final time from their own 19 with 2:18 remaining.

Tight end Joseph Fauria caught a pass over the middle on fourth-and-7 and lateraled the ball to Jordon James to complete a 17-yard pass. That helped set up Fairbairn's field goal, which never looked on target.

Stanford has beaten the Bruins five straight games. UCLA was going for its first conference championship since 1998.

The Bruins still had to feel better about their showing than last year's league title game, when they lost 49-31 at Oregon in lame duck coach Rick Neuheisel's weird finale-the Bruins had a 6-6 record and only advanced out of the South Division because crosstown rival Southern California was finishing a two-year postseason ban for NCAA violations

The crowd was the smallest at 50,000-seat Stanford Stadium since the Cardinal drew 30,626 against Sacramento State on Sept. 4, 2010.