STANFORD, Calif. -- Stanford kept its Rose Bowl hopes alive by rallying from a 23-14 deficit for a 27-23 victory over Oregon State on Saturday at Stanford Stadium.
No. 14 Stanford scored the game's first 14 points in a dominating first quarter before Oregon State scored 23 unanswered points.
But redshirt freshman quarterback Kevin Hogan led the Cardinal to two more touchdowns, one on the final play of the third quarter, and the other coming with 5:07 left after a Beaver turnover, to pull out the victory.
Oregon State had one final chance in the closing minutes, but quarterback Cody Vaz was sacked on a third-down play and was injured. Sean Mannion came in on a fourth-and-14 play from the Oregon State 31 with 2:10 left and threw an incomplete pass to end the Beavers' hopes.
Stanford committed four turnovers to one for Oregon State, but the Beavers' turnover was costly.
Stanford (8-2, 5-1) still has hopes of getting to the Pac-12 title game, but Oregon State (7-2, 5-2) will drop from its No. 11 spot in the BCS.
Hogan, making his first college start, completed 22-of-29 passes for 254 yards, with three touchdowns and two interceptions. Stepfan Taylor rushed for 114 yards.
Vaz, making his fourth college start, was 23-of-38 for 226 yards.
Oregon State took its first lead of the game when it marched 75 yards following the second half kickoff. Vaz's 22-yard touchdown pass to Markus Wheaton put the Beavers ahead, 17-14, at 10:17 of the third quarter.
The Beavers added a 42-yard field goal by Trevor Romaine to make it 20-14 after Hogan had a pass tipped and it was interceptede by Ryan Murphy at the Stanford 27-yard line.
A 44-yard field goal by Romaine increased the Beavers' lead to 23-14 with 3:30 left in the third quarter.
Stanford closed the gap to 23-21 on the final play of the third quarter thanks to individual efforts by Hogan and Taylor.
Hogan was on his way down, apparently sacked, when he unloaded a pass to Taylor, who shook off two tackles on his way to a 40-yard touchdown.
Stanford regained the lead after Vaz fumbled at the Oregon State 29 without being hit. The Cardinal turned that turnover into a touchdown when Hogan hit Zach Ertz on a 14-yard pass for the winning score with 5:07 left.
Each team dominated a quarter during the first half, which ended with Stanford holding a 14-10 lead.
With 31 seconds left in the first quarter, Stanford held a 14-0 lead and had outgained the Beavers 194 yards to minus-4. For the rest of the half, Oregon State outscored Stanford, 10-0, and outgained the Cardinal, 164-91.
Stanford committed the only two turnovers of the first half, and one came on its first possession. But the Cardinal drove 93 yards in 13 plays on its next possession to score the game's first touchdown with 5:41 left in the first quarter.
Hogan fumbled a snap when Stanford was at the Beavers' one-yard line on that scoring drive, but Taylor scored on the next play from a yard out.
Stanford drove 80 yards in 10 plays on its next possession, with Hogan's 12-yard touchdown pass to Ryan Hewitt making it 14-0 with 31 seconds left in the first quarter.
After doing nothing on its first two possessions, Oregon State marched 82 yards for a score on its third possession to cut the deficit to 14-7. Terron Ward finished the 10-play drive with a seven-yard touchdown run.
Oregon State drove 79 yards on its next possession, but was stopped at the Stanford three-yard line and had to settle for Romaine's 20-yard field goal to make it 14-10.
NOTES: Late in the first half, Stepfon Taylor surpassed 1,000 yards rushing for a third straight season, the first Cardinal player in history to do so. He also fumbled for the first time this season and for the first time in 262 carries. ... Saturday's game was Stanford's final regular-season home game. The Cardinal finishes with road games against two nationally ranked teams, Oregon and UCLA . ... This was Oregon State's last road game. The Beavers finish up with home games against Cal, Oregon and Nicholls State. The Nicholls State game, scheduled for Dec. 1, was postponed from earlier in the season because of weather concerns and will be canceled if Oregon State plays in the Pac-12 title game, which is scheduled for Nov. 30. ... Oregon State and Stanford entered Saturday's game thinking they could get to the Rose Bowl, even if neither beats Oregon. If the Ducks finish unbeaten and go to the national championship game, the Rose Bowl could choose another Pac-12 team, provided that team finishes in the top 14 of the final BCS standings. Whether Oregon State or Stanford would finish in the top 14 with a loss to Oregon is debatable. ... Two of Oregon State's top players, running back Storm Woods and cornerback-punter returner Jordan Poyer, played Saturday after missing the previous week's game because of sprained ankles.