STANFORD, Calif. -- Stanford coach David Shaw fought back tears. Running back Stepfan Taylor's voice trembled. Linebacker Alex Debniak's eye black smeared all over his face.
In the home locker room at Stanford Stadium late Saturday afternoon, these were not the looks of the losers. Instead, they were the emotions from surviving Senior Day and the possibility of an intriguing opportunity ahead: a chance to host one more game this season.
And they can thank a redshirt freshman and a fortunate fumble for the chance.
Kevin Hogan threw for 254 yards and three touchdowns in his first collegiate start, and No. 16 Stanford overcame four turnovers to rally past No. 13 Oregon State 27-23 on Saturday and stay in control of its Pac-12 title hopes.
"They came back and made some plays to help us win the game," Shaw said. "Almost Shakespearean, to a certain degree."
Oregon State quarterback Cody Vaz fumbled late in the fourth quarter to give the Cardinal (8-2, 6-1) the ball at the Beavers 29. The only Oregon State (7-2, 5-2) turnover turned out to be the difference.
Hogan audibled out of a run and called the play "Special," which Stanford also ran to convert a fourth-and-9 in an overtime win against Arizona earlier this season, and hit tight end Zach Ertz for a 13-yard touchdown to make it 27-23 with 5:07 left and Stanford stopped the Beavers twice more.
Now the Cardinal will head to second-ranked Oregon next in what could be a North Division final -- if Stanford also beats UCLA in its season finale -- for a spot in the conference championship game. Oregon has beaten Stanford the last two seasons.
"We've got to realize what's at stake," said Taylor, who ran for 114 yards and a touchdown, eclipsing 1,000 yards rushing for the third straight season. "I think everybody on this team knows that and everybody is coming together for that one goal that we all want."
Oregon State won the turnover margin 4-1 but only converted three points out of them -- and the one mistake cost the Beavers badly.
Vaz fumbled while shifting the ball during a scramble and Josh Mauro recovered. After Ertz caught the go-ahead touchdown, Oregon State got the ball back and Debniak sacked Vaz on third down.
The quarterback left with an ankle injury, and Sean Mannion -- the former starter -- threw incomplete on fourth-and-16 from the Oregon State 37 with 1:52 left.
Hogan, who took over the starting role from inconsistent Josh Nunes, completed 22 of 29 passes with two interceptions. He also ran for 49 yards on 11 carries.
Vaz finished 23-of-38 passing for 226 yards and a touchdown and Storm Woods ran for 94 yards in a deflating loss for Oregon State, which rallied from a 14-0 deficit to score 23 straight points and controlled the pace for most of the game.
The Beavers, who haven't played in the Rose Bowl since 1965, had their BCS and Pac-12 title hopes severely damaged.
"We're disappointed obviously," Oregon State coach Mike Riley said. "It was a tough loss and we had our opportunities. What we did was give up the big play two scores up and gave them back the momentum. That was big for them. Then the turnover gave them good field position to score the winning touchdown."
Stanford started strong and closed fast.
After Ertz fumbled on Stanford's opening possession, the defense stopped Oregon State three-and-out. Then Hogan led a 13-play, 93-yard scoring drive -- the Cardinal's longest of the season -- capped by Taylor's 1-yard touchdown run.
Hogan kept the momentum going, rolling to his right and hitting fullback Ryan Hewitt on a play-action pass. Hewitt sliced back inside and bulldozed through a defender for a 12-yard TD that gave Stanford a 14-0 lead late in the first quarter.
The Beavers came back in a hurry.
They used three different running backs on an 81-yard drive that came almost exclusively on the ground. Terron Ward finished it off when he ran for a 7-yard score to the Beavers on the board, and Trevor Romaine kicked the first of his three field goals to slice Stanford's lead to 14-10 in the second quarter.
In the final minutes of the first half, Tyrequek Zimmerman stripped Taylor at the Oregon State 21. That ended a streak of 262 rushes for Taylor without a fumble.
Oregon State converted two long third down on the opening possession of the third quarter. None better than when Vaz found Markus Wheaton on a short screen pass over the middle on third-and-16 for a 22-yard touchdown to give the Beavers a 17-14 lead.
Rudolf Fujita tipped Hogan's pass that Feti Taumoepeau intercepted. Stanford's defense held Oregon State to a 42-yard field goal by Romaine, who made another from 44 yards later in the third quarter for a 23-14 lead.
The momentum changed for good on one play.
Taylor took a short pass from Hogan while the quarterback was being tackled. Taylor made a defender miss down the sideline, cut back inside and stiff-armed another to the ground for a 40-yard TD that trimmed Oregon State's lead to 23-21 as the third quarter expired, a play Shaw called the best of Taylor's career.
Rashaad Reynolds outjumped Jamal-Rashad Patterson to intercept Hogan's pass midway through the fourth. Two plays later, Vaz fumbled, and Stanford surged back to squeak out a far-from-perfect victory.
"In the end, we got our goal," Hogan said. "So I'm happy about that."