STANFORD, Calif. -- When Nate Whitaker walked on the field with 4 seconds left, his focus was entirely on the potential game-winning kick and not the missed extra point that was the difference in the game at that point.

Given a second chance after an expert drive by Andrew Luck, Whitaker atoned for his earlier miss by kicking a 30-yard field goal on the final play to give No. 16 Stanford a 37-35 victory over Southern California on Saturday night.

"I knew I had to make it," Whitaker said. "There wasn't too much else going through [my mind] except it was my chance to redeem myself and give the team what it needed."

Whitaker missed his earlier kick after Stanford's final touchdown and that looked as if it could be the difference after USC took a 35-34 lead on Allen Bradford's 3-yard run and an extra point by Joe Houston with 1:08 remaining.

That's when Luck stepped up for Stanford (5-1, 2-1 Pac-10), taking over at the 26 with 1:02 left and two timeouts. The drive got an immediate boost when USC linebacker Chris Galippo was called for a personal foul after the first play to move the ball to the Stanford 45.

"There wasn't a whistle," Galippo said. "I was trying to bring him down. I saw he was in the grasp but he was still standing up and I knew every yard counted so I was trying to drive him back. At the end of the day it could have gone either way."

Luck followed with completions to Coby Fleener and Doug Baldwin to get the ball to the USC 31. Stepfan Taylor, whose second fumble set up the go-ahead score for USC, then carried twice for 21 yards and Luck took a knee to set up Whitaker's kick.

"I didn't say anything after the miss and didn't say anything before the kick," coach Jim Harbaugh said. "I had faith in Nate. He went in and drilled it. It wasn't even close."

USC coach Lane Kiffin chose not to ice Whitaker, who drilled the winning kick for his 15th straight made field goal, setting off a mad celebration on the field. It was his first career game-winner.