BERKELEY, Calif. (AP) Davis Webb has been waiting for a chance to beat Texas for almost as long as California waited for a big win against a ranked opponent.
A big performance by Webb made both come true on a night when the Golden Bears once again struggled defensively and running back Vic Enwere made a bonehead play that nearly cost Cal a chance to win.
Webb threw his fourth touchdown pass of the game to break a tie with 3:41 to play and California got its first win over a Top 25 team in nearly four years, beating No. 11 Texas 50-43 on Saturday night.
''I had a lot of motivation for this game,'' Webb said. ''We out-toughed them, we out-physicaled them.''
Webb, who grew up outside Dallas cheering for the Longhorns, made the most of his first meeting against his home-state team after watching from the sidelines the past three years when he was at Texas Tech.
He threw for 396 yards, ran for a score and connected on a 12-yard pass to Chad Hansen that broke a 43-all tie and gave coach Sonny Dykes his biggest win in four seasons at Cal (2-1).
''I know this game meant a lot to him,'' Dykes said. ''I know he talked about this week as just another ballgame. But if you grow up in Texas and have a chance to play Texas and win the ballgame, it's something special to you.''
D'Onta Foreman ran for 157 yards and two touchdowns, while Chris Warren added 119 yards on the ground and two scores for the Longhorns (2-1), who were looking for their first 3-0 start since 2012.
But their inability to slow down Webb and the Bears did them in, especially on the go-ahead drive.
''I wouldn't say there was necessarily confusion, we just didn't execute,'' cornerback Sheroid Evans said. ''We knew what they were going to run, they ran what they were going to run and we just didn't execute.''
Texas had a shot to match Cal's last TD, but Shane Buechele was sacked on third down deep in his own territory late. Texas punted and never got the ball back.
''We had the ball and had two timeouts left and hoped that we would get a stop before then but Cal busted out on third down,'' coach Charlie Strong said.
Enwere appeared to ice it when he ran 55 yards for a touchdown. But he dropped the ball at the 1 and the TD was overturned by replay. Because there was no immediate recovery, Cal kept the ball and ran out the clock for a second straight win over the Longhorns. The Bears won 45-44 last year when Nick Rose missed an extra point with 1:11 to play.
''I was just trying to make the game just as exciting as last year's ending,'' Enwere said. ''Tried to give the people what they wanted. Couldn't go home that easy.''
Texas: The Longhorns scored on their first four possessions and led by 10 points midway through the second quarter before the offense started to stall a bit. Buechele left the game briefly with a chest injury, and he and backup Tyrone Swoopes each threw costly interceptions in the first half that helped Cal get back into the game.
California: Despite losing No. 1 overall draft pick Jared Goff to the NFL, the Bears' offense hasn't missed a beat under graduate transfer Webb. The defense still needs work if Cal wants to contend in the Pac-12. The Bears entered the game allowing an FBS-worst 6.8 yards per carry and wasn't much better against the Longhorns, allowing 307 yards on 51 runs.
Webb and Hansen have developed an immediate chemistry. Hansen caught 14 passes in each of the first two games and then had 12 receptions for 196 yards and two TDs against Texas.
''It's funny, Chad had a quiet 12 catches for 196 yards tonight,'' Dykes joked. ''Kind of a disappointing game. He's been used to catching 14 a game.''
After shooting up the rankings following a season-opening win, Texas should drop in the poll this week after losing to unranked Cal.
Texas: The Longhorns have a week off before opening Big 12 play with a trip to Oklahoma State.
California: The Bears open Pac-12 play with a trip to Arizona State.
AP college football website: collegefootball.ap.org