STANFORD, Calif. -- After a sluggish first half by Southern California, it looked as if there could be another Stanford stunner.
Then the Trojans took control of the trenches and the game to put last year's shocking loss to the Cardinal to rest.
"I felt like we owed them something," linebacker Rey Maualuga said. "They came into our house and got one from us. I definitely feel like we owed them a favor."
It took a while for the Trojans (9-1, 7-1 Pac-10) to give it to Stanford (5-6, 4-4) as they failed to make a first down until the second quarter and were lucky to go into the half tied at 17 because of two long kickoff returns.
But in the second half, USC kept Stanford off the scoreboard until the final play and ran for 243 yards in the kind of dominating performance that was lacking last year when the Trojans lost 24-23 to Stanford as a 41-point home favorite.
"When we got in the locker room, it just wasn't going to be," coach Pete Carroll said. "These guys just were not going to let this game stay the same. Both lines of scrimmage just went crazy."
Last year's loss still stung 13 months later and there were plenty of reminders in the first sellout in three seasons at the remodeled Stanford Stadium.
From the highlights of the game played on the video board during warmups, to the "Greatest Upset Ever" T-shirts worn by many fans in the crowd to the Stanford band spelling out the score of last year's game at halftime, the Cardinal did their best to extend the memory.
Their play on the field early in the game did even more to upset the Trojans. Stanford dominated the line of scrimmage on both sides of the ball early in the game before Gable's 93-yard kickoff return tied the game before the half.
"There was a lot of talk about revenge coming into this game," Stanford coach Jim Harbaugh said. "That's a word I don't use in college football. We knew USC was coming to play and our team came out and played a better first half."
There was a bit of gamesmanship in the closing seconds, as Harbaugh sent on Aaron Zagory for a field goal in the closing seconds because he wanted to get some points. Carroll called a timeout, and backup quarterback Alex Loukas convinced Harbaugh to go for it. Loukas delivered with an 18-yard pass TD pass to Austin Gunder.
"He can do whatever he wants," Carroll said. "I don't care."
The win helped USC keep pace with Oregon State (7-3, 6-1) in the Pac-10 race and stay in the hunt for a berth in the BCS title game. The Beavers own the tiebreaker in the conference based on a head-to-head win and the Trojans trail five teams in the BCS standings, meaning they still need some help to reach their goals this season.
Stanford has one more chance to achieve its goal of reaching a bowl game for the first time since 2001, needing a win in the Big Game next week at California to become eligible.
"It's a one-game season now and we want this for the seniors," said quarterback Tavita Pritchard, who engineered the comeback last year in his first career start. "We want to get these guys a bowl game."
Johnson finished with 115 yards rushing, scoring on the go-ahead 7-yard TD run late in the third quarter. Gable's 3-yard run early in the fourth extended the lead and the Trojans put the game away on Mark Sanchez's 50-yard touchdown pass to fullback Stanley Havili.
"We just needed to come out and dominate," USC offensive lineman Jeff Byers said. "We needed to go and put fear in the opponents' eyes and do what we can do."
Sanchez, who watched as an injured John David Booty threw four second-half interceptions last year against the Cardinal, went 11-for-17 for 136 yards and two touchdowns.
Gerhart finished with 101 yards and a touchdown, giving him 1,033 for the season. He is the first Stanford back to top the 1,000 mark since Tommy Vardell ran for a school-record 1,084 yards in 1991.
Pritchard finished 9-for-22 for 111 yards and an interception.
"Our team is closing the gap," Harbaugh said. "We didn't get the turnovers like we did last year but we're a much improved team. That doesn't always show up in the win column."
Stanford started out fast, getting a 16-yard pass from Pritchard to Delano Howell on the second play. Pritchard then ran 40 yards on a scramble for the longest run of the season against USC. Gerhart capped the drive with a 4-yard run.
In the second quarter, Gerhart broke tackles and stumbled his way for 40 yards down to the 1 to set up Anthony Kimble's 1-yard score. But the Trojans tied it at 17 on Gable's kickoff return. The Trojans had three kickoff returns of at least 50 yards in the game, getting two from Ronald Johnson.