Jared Goff threw a 10-yard touchdown pass to Chris Harper for the go-ahead score with 8:42 remaining Saturday night, rallying Cal to a 44-31 win over Oregon State.
Daniel Lasco rushed for a career-high 188 yards on 30 carries and scored on touchdown runs of 14, 21 and 15 yards to help the Bears (5-4, 3-4 Pac-12) snap a three-game losing streak and move within a game of becoming bowl eligible.
The comeback spoiled a record-setting performance for Oregon State's Sean Mannion, who completed 30 of 45 passes for 320 yards and became the Pac-12's all-time passing leader.
Mannion, who entered the game needing 194 yards to break former USC quarterback Matt Barkley's record of 12,327 yard, completed passes to seven different receivers, but the Beavers (4-4, 1-4) suffered their third consecutive loss.
Goff completed 24 of 47 passes for 277 yards.