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.
"I didn't know if I would make it out from being down there," Whitaker said. "I couldn't breathe for too long. It felt good."
Robert Woods caught 12 passes for 224 yards and three touchdowns and Matt Barkley threw for 390 yards and the three scores for the Trojans (4-2, 1-2), who lost for the second straight week on a field goal on the final play.
USC lost 32-31 at home to Washington last week on Erik Folk's 32-yard field goal as time expired and allowed another game-winning drive this week.
"It's really disappointing to end two games like that," Barkley said. "We go from the highest high to the lowest low. It's no fun to lose."
The Cardinal were expected to win coming into the game after getting off to a fast start this season and having beaten the Trojans 55-21 in Los Angeles last year. The most memorable moment in that game came when Harbaugh chose to go for a 2-point conversion with a 27-point lead and less than 7 minutes remaining.
It looked for a while as if the conversion after a touchdown for Stanford in the fourth once again would be the most talked about play after the Trojans took the late lead. But Stanford got the score it needed on its final drive.
"We had confidence," Luck said. "If you don't go out on the field with confidence you're going to score or get the ball in scoring position, it's not going to happen. We haven't been in too many situations like that in my career at Stanford. We practice it a lot. That practice paid off."
Luck completed 20 of 24 passes for 285 yards and three TDs. Taylor ran for 104 yards and one touchdown and Baldwin caught six passes for 98 yards and two scores.
The second half was mostly an offensive highlight reel. The teams scored touchdowns on five straight possessions before USC was stopped on a fourth down with 6:54 remaining. But Taylor's fumble and the two scoring drives made for a dramatic finish.
Luck led two long TD drives in the second half and Chris Owusu's 88-yard kickoff return set up another touchdown as Stanford's offense looked as efficient as always.
USC was nearly as good. Stanford had no answer for Woods, who scored on a 6-yard pass in the second quarter, a 61-yarder in the third and a 6-yarder in the fourth.
"Spectacular. You're talking about a true freshman coming in here and making plays for us," Kiffin said. "Last week he didn't have a catch. This week the coaches made sure to incorporate him into the game plan."
The most memorable play in the first half came in the final minute when Taylor lost his first fumble.
Shareece Wright scooped up the loose ball and had visions of making a long return before Luck flattened him with the kind of hit quarterbacks usually receive instead of hand out. Wright lost the ball after the jarring hit. The Trojans recovered but could not score as the game went to the half tied 14-14.
Nike Youth USC Trojans #15 Cardinal Football Game JerseyShop
Linebacker Myles Jack, who suffered a season-ending knee injury, said Thursday he decided to leave UCLA and enter the 2016 NFL draft because he wants to be compensated for his skills.
Randy Edsall will coach Maryland against No. 1 Ohio State on Saturday, the school announced Thursday as rumors swirled about his job status going forward.
Tennessee chancellor Jimmy G. Cheek has issued a statement amid rumors that alleges coach Butch Jones fought and punched senior offensive lineman Mack Crowder during a fall practice session.
With the addition of a few tweaks, UConn football coach Bob Diaco is still planning to bring a rivalry trophy with him to Florida on Saturday when the Huskies play UCF.
Arizona quarterback Anu Solomon will start against Oregon State on Saturday, a source told ESPN.
Rutgers receiver Leonte Carroo returned to practice Thursday after charges that he attacked a woman he used to date were dropped, and he said he was "lucky" to be playing again.