On the road, missing their starting quarterback, and facing a five-point deficit with no timeouts and less than a minute on the clock… The Oregon State Beavers were firmly up against it inside Stanford Stadium Saturday night.

And then Beaver wideout Tre’Shaun Harrison did his best Stefon Diggs impression, climbed the back of a Stanford defensive back to haul in a prayer from quarterback Ben Gulbranson, and raced to the endzone to give Oregon State a 28-27 win over the Cardinal.

Oregon State outscored Stanford 18-3 in the fourth quarter to come back and win. The Beavers did so without regular starting quarterback Chance Nolan, who did not make the trip to Palo Alto after suffering a neck injury the week prior.

The third-year freshman Gulbranson started in his place and completed 20 of his 28 pass attempts for 250 yards and two scores. A week after throwing two interceptions in relief of Nolan, Gulbranson was clean with the football. After eight combined turnovers in the previous two weeks, Oregon State didn’t give the ball away a single time.

Harrison finished with seven catches for 104 yards and the touchdown.

Facing a third-and-4 from the Oregon State 24 with 63 seconds left on the clock, Stanford could have ended the game with a first down. The Cardinal held a 24-22 lead at that point and Oregon State had just taken its final timeout. But Stanford inserted backup freshman quarterback Ashton Daniels and he was promptly hit in the backfield for a loss of 4.

Stanford kicked a field goal to go up 27-22 and then kicked the ball back to Oregon State. Gulbranson took over at his own 24-yard-line with 54 seconds on the clock. He hit Harrison for 9 yards to get the drive going, then found Anthony Gould for 11 yards.

His 56-yard connection to Harrison was the Beavers’ longest play of the game.

Oregon State moved to 4-2 (1-2 Pac-12) with the win. The Beavers host Washington State next Saturday at Reser Stadium for a 6 p.m. PT kick.