BERKELEY, Calif. - Tyler Fredrickson's last two field goal attempts had been blocked, so the California kicker had terse instructions for the final try.

Get the ball to the middle of the field. Get a good snap. Stand back for a celebration.

Fredrickson made a 38-yard field goal to end a third crazy overtime as Cal upset No. 3 Southern California 34-31 Saturday, ending the Trojans' 11-game winning streak with a victory that stretched past dusk and decades of history.

Ryan Killeen, who tied it with a 33-yard field goal for the Trojans with 16 seconds left in regulation, missed a 39-yarder moments before Fredrickson's kick. Fredrickson, a former walk-on, began yelling instructions at his teammates and coaches moments before his final attempt.

"We moved the ball back about a yard," Fredrickson said. "It's not the way you'd do things ideally, but they had blocked two kicks. It got to the point where I was going to do anything necessary to end this game. I never doubted that last kick."

The temporary lighting installed at Memorial Stadium for the afternoon start was at full power when the game ended in near-dark. Fredrickson ran to midfield and slid on his knees after the kick - and he was soon engulfed by the Cal student section and thousands more in the huge crowd, which stormed the field.

"I have two headsets on down there on the field, but I thought the crowd was very loud," Cal coach Jeff Tedford said. "The overtime was a roller coaster. It's just so great to see the look in our kids' eyes. They never have a doubt. They play their tails off for as long as it takes."

Cal (3-3) never trailed, but never held a comfortable lead in a tense matchup of two old rivals. The Golden Bears were heavy underdogs against USC's powerful lineup, but they reduced the Trojans to a one-dimensional offensive team in Cal's first home victory over a Top 5 team since upsetting No. 4 USC 28-14 in 1975.

"It's just so great to see the look in our kids' eyes. They never have a doubt."

After falling behind by 14 points in the first half, USC (3-1) was saved twice by its special teams, which blocked field goals in the fourth quarter and at the end of the first overtime - but the Trojans couldn't score on two of their three overtime possessions.

"It was very disappointing," USC coach Pete Carroll said. "When you're on a streak, you get to thinking (losing) will never happen to you, but it can. A lot of things happened in the first half. Too many things got away from us."

After USC rallied from a 14-point second-half deficit, the teams played three madcap extra periods featuring a fumble, a blocked field goal and outstanding passing by both quarterbacks.

In both teams' Pac-10 opener, the Golden Bears posted the biggest victory yet in Tedford's rebuilding project and snapped the second-longest winning streak in the nation behind Ohio State's 19-gamer.

Matt Leinart overcame a shaky start to go 21-of-39 for 277 yards for the Trojans, but he was intercepted three times. Mike Williams had six receptions for 96 yards, while Keary Colbert had eight catches for 81 yards and an overtime TD for the Trojans, who overcame a 14-point second-half deficit.

"I take the blame for some of it," Leinart said. "Our offensive line blocked great. We just didn't execute at times, and in the first half we lost focus a little bit."

The Trojans didn't endear themselves to Cal with their behavior before the game or during it. According to many Cal players, USC provided trash talk it couldn't back up.

"They always take us lightly," said receiver Jonathan Makonnen, who had seven catches for 104 yards. "They really don't respect us. They're a talented team, but they were kind of lackadaisical out there."

Tyler Fredrickson watches his game-winning field goal go through the uprights against USC.

"I'm not knocking Leinart or their running backs, but I didn't see a whole lot of firepower from them," said Echemandu, the first player to rush for 100 yards against USC in 16 games. "Mike Williams is basically their whole offense."

Robertson, who lost his starting job to Rodgers earlier in the month, was ineffective until the fourth quarter, when he led a 61-yard drive capped by Fredrickson's career-best 51-yard field goal with 9:04 left.

Fredrickson's second straight 51-yard attempt was blocked by Shaun Cody with 4:54 left. USC converted a fourth down while driving to the Cal 15, where Killeen easily made the tying kick.

USC fumbled on its first overtime possession, but USC's Gregg Guenther blocked Fredrickson's 29-yard field goal attempt. The teams traded TD passes in the second OT.

The Trojans could only manage a field goal attempt on its third possession, but Killeen's clean kick was wide left.

Rodgers' 3-yard TD keeper in the first quarter was the first rushing score allowed by USC in 23 quarters. He picked apart the Trojans' confused secondary in the first half, leading two scoring drives.

Lofa Tatupu capped USC's second-half comeback by intercepting Rodgers and scampering untouched for a 26-yard game-tying score in the third quarter. Robertson took over on the Bears' next drive.