LOS ANGELES -- USC kicker Andre Heidari missed an extra-point attempt in the first quarter on Saturday night against No. 5 Stanford, but given a chance to be a hero in the closing seconds, he didn't disappoint.
Heidari connected on a 47-yard field goal and the Trojans stunned Stanford 20-17 in sold-out Los Angeles Memorial Coliseum, sending the Pac-12 Conference spinning and perhaps securing the USC head coaching job for interim coach Ed Orgeron.
Upsetting the fifth-ranked team in the country certainly doesn't hurt Orgeron's cause.
Or rolling the dice by going for it on fourth down in the closing minute of the game and having USC quarterback Cody Kessler complete a fourth-down pass to wide receiver Marqise Lee for 13 yards to extend the winning drive with a play that began at the Stanford 48-yard line and ended at the 35.
"We deserved a chance to give our team a win, as hard as they were playing," Orgeron said. "There was a big belief on the sideline."
Kessler said, "It's his call and his decision, but obviously in our eyes we were saying let's go for it. We were giving him that look."
When the Trojans converted, it gave Heidari a chance to redeem himself from his earlier mistake.
The key was keeping things in perspective.
"It's a regular kick," he kept reminding himself on the sideline. "It's the same kick every time."
Upon putting it through the uprights, it was a matter of the defense holding on for the win, which culminated with USC fans rushing the field in jubilation.
"This was for the Trojans family," Orgeron said.
And maybe for his job.
But that is a decision for another day.
For one night, the Trojans (8-3 5-2) looked, acted and played like an elite team again.
Meanwhile, the Cardinal (8-2, 6-2) misfired twice on chances to win.
Stanford tied the score at 17 with 8:22 remaining in the third quarter on running back Tyler Gaffney's 18-yard run.
But the Cardinal missed two chances to take the lead, first when kicker Conrad Ukropina's 30-yard field goal attempt was blocked and then when quarterback Kevin Hogan was intercepted by Dion Bailey at the USC 7.
Hogan was also intercepted with 3:02 remaining in the fourth quarter by Su'a Cravens and the score tied.
"We had opportunities. That's the name of this game," Stanford coach David Shaw said. "Missed opportunities."
Gaffney, who rushed for 164 yards and two touchdowns on 24 carries, said, "It's not a good feeling. We expect to win every game we play."
But a week after beating Oregon, the Cardinal ran into an emotional, hot USC team in front of a jammed Coliseum.
And it proved to be too much.
The key now is to focus on their final two games of the season, and hope they qualify for the Pac-12 championship game.
"We have to (forget this loss)," Gaffney said. "We have to stay even keel, that's what we preach around here."
The Trojans stunned Stanford in the first half, carried by the hot hand of Kessler, some creative play calling and the type of physicality needed to stand up to the imposing Cardinal.
Kessler opened by hitting 8 of his first 9 passes, including a 1-yard touchdown pass to Soma Vainuku, and Javorius Allen added a 1-yard run as USC took a 17-7 lead.
Gaffney ran 35 yards for Stanford's only touchdown and Conrad Ukropina added a 27-yard field goal with 17 seconds remaining in the half to cut USC's lead to 17-10.
Kessler completed 12 of 14 passes for 158 yards in the first half, which helped make up for USC's 23 yards rushing against the Cardinal's physical defense.
Stanford ran for 101 yards, but Hogan threw for just 47 yards and the Cardinal were turned back on two key third downs to help USC take the 10-point halftime lead.
"We knew it was going to be that kind of first half. We talked about it all week. They were going to come out like gangbusters," Shaw said. "We withstood it; we got back to within seven. We wanted to tie the game, we tied it."
But with the game in reach, they turned the ball over and had a chip-shot field goal attempt blocked.
"That's football," Shaw said.
NOTES: Contrary to popular belief, USC's oldest rival is Stanford, not UCLA or Notre Dame. Though the Trojans own a decided 58-29-3 lead over the Cardinal in a series that began in 1905, Stanford won the last four going into Saturday's matchup at the Coliseum. ... Stanford had won four consecutive games against nationally ranked teams for the first time in school history. ... Including its Rose Bowl win over Wisconsin, Stanford has won 31 of its last 32 games in California, the only loss coming to Oregon in 2011.