Darren Yamashita-USA TODAY Sports

Backup quarterback Ben Gulbranson and Tre'Shaun Harrison hooked up on a 56-yard touchdown pass with 13 seconds left Saturday night as Oregon State rallied from a 14-point fourth-quarter deficit to stun host Stanford 28-27 in Palo Alto, Calif.

Harrison plucked Gulbranson's pass from behind a defender at the Cardinal 35-yard line and then raced past multiple defenders to the end zone for a stunning score that improved the Beavers to 4-2 overall and 1-2 in the Pac-12 Conference.

Gulbranson, playing in place of injured starter Chance Nolan, completed 20 of 28 passes for 250 yards and two touchdowns. He started the comeback by hitting Silas Bolden for a 21-yard scoring strike on the fourth quarter's first play.

Damien Martinez brought Oregon State within 24-22 on a 43-yard run with 5:45 left in the game, but Joshua Karty connected on a 46-yard field goal with 58 seconds remaining to give Stanford (1-4, 0-4) a five-point lead that didn't hold up.

Cardinal quarterback Tanner McKee completed 20 of 32 passes for 269 yards and two scores, both to Brycen Tremayne. It wasn't enough to keep Stanford from losing its 11th straight game against FBS foes, dating to last year.

The first half was well-played for the most part. Both teams moved the ball well, but the difference was that Stanford was able to finish off more drives with points.

After Oregon State missed a 40-yard field goal on its first possession, the Cardinal took a 7-0 lead at the 3:37 mark of the first quarter when Casey Filkins scored on a 1-yard run.

The Beavers responded with a 99-yard drive that chewed up more than 7 1/2 minutes and ended on a 1-yard run by Jack Colletto out of the wildcat formation with 10:52 left in the second period.

Stanford made it two scores in two possessions on a 47-yard field goal by Karty with 8:44 remaining before halftime, then expanded its lead to 17-7 when McKee hooked up with Tremayne for a 21-yard touchdown pass with 58 seconds remaining.

More must-reads:

TODAY'S BEST
Rangers designate right-hander for assignment
Watch: Denmark's Christian Eriksen nets goal at Euro 2024 three years after suffering cardiac arrest
Giants place left-hander on 15-day IL with ankle sprain
Oilers crush Panthers in Game 4, stay alive in Stanley Cup Final
Dodgers ace leaves game against Royals due to triceps tightness
Sam Mayer uses overtime restart to win Xfinity Series' return to Iowa
Liberty forward pushes herself into MVP conversation with big game vs. Aces
Tiger Woods makes big admission about his U.S. Open future
Cubs P 'Mike' Imanaga continues hot start vs. Cardinals
Celtics' All-Defensive guard reportedly could replace Kawhi Leonard on Team USA
Tee Higgins' contract decision adds pressure on Bengals in 2024
One-time Defensive Player of the Year open to reunion with former team
College baseball has become too regional for its own good
Three Padres prospects who should be untouchable in trade talks
Connor McDavid's history-making night helps Oilers stave off elimination
Astros scratch Justin Verlander as nightmare season continues
Watch: Oilers chase goaltender Sergei Bobrovsky from Game 4
Watch: Rockies third baseman takes advantage of Pirates laziness' to steal home
Pirates place young catcher on concussion IL
Watch: Game 4 of Stanley Cup Final gets off to chaotic start

Want more sports news?

Join the hundreds of thousands of fans who start their day with Yardbarker's Morning Bark, the best newsletter in sports.