STANFORD -- Quarterback Josh Nunes picked the perfect time to play the game of his life.

Nunes directed two fourth-quarter touchdown drives Saturday as Stanford rallied for a 54-48 overtime victory over Arizona before an announced crowd of 48,204 at Stanford Stadium.

The wild game, which featured 11 lead changes, was part of a Cardinal ticket mini-plan in which participating fans will receive Andrew Luck bobbleheads.

It also came nine days after Nunes was criticized by fans and media for his performance in a loss at Washington in which Stanford failed to score an offensive touchdown.

Against that backdrop -- and with Stanford desperate to keep pace with Oregon in the Pac-12 North -- Nunes responded by completing 21 of 34 passes for 360 yards and two touchdowns.

He also ran for three scores.

"It's not what we learned (about Nunes); it's maybe what other people learned," Stanford coach David Shaw said. "He's a tough kid. He bounces back. He doesn't listen to the noise."

Nunes was at his best when Stanford (4-1, 2-1 Pac-12) needed him most: After Arizona and its high-powered offense took a 48-34 lead with nine minutes left.

The redshirt junior calmly orchestrated a 60-yard touchdown drive that pulled the Cardinal within a touchdown with 6:34 remaining.

He then directed a 79-yard scoring drive -- it included a 17-yard pass to tight end Zach Ertz on fourth down -- that tied the game with 45 seconds left.

Both possessions ended with touchdown runs -- by Nunes.

Advertisement

"I definitely used (the Washington loss) as a steppingstone," Nunes said. "I feel like I did a better job. I made a lot of throws that I didn't make last week. It was mainly ball position, velocity -- just be more consistent."

Shredded for much of the game, Stanford's defense took over when overtime began: On third down, end Henry Anderson deflected quarterback Matt Scott's pass high into the air; linebacker Chase Thomas came down with the interception at the 6-yard line.

At that point, all Stanford needed was a field goal. It got a touchdown instead as tailback Stepfan Taylor ripped through the Wildcats' exhausted defense for a 21-yard, game-winning score.

The victory came on the fifth anniversary of the Cardinal's epic upset of USC and likely preserved No. 18 Stanford's streak of weeks in The Associated Press top-25 poll (37 and counting).

"We're not a great team right now, but we're getting better," Shaw said. "And the one thing we have is guys who have won a lot of games. You can't discount that experience."

The Cardinal and Wildcats combined for 75 points after halftime and 1,234 total yards -- 617 by each team.

Stanford used a combination of its power running game and an efficient downfield passing attack against one of the Pac-12's worst defenses.

Taylor rushed for 142 yards while Ertz and fellow tight end Levine Toilolo combined for 11 catches for 205 yards.

"We always talk about winning one-on-one matchups, whether it's in the run game or the pass game," Toilolo said. "Josh put some great balls up there."

The Wildcats started slowly -- no points in the first quarter -- but eventually befuddled Stanford with their no-huddle, spread offense. Using short passes as a substitute for the running game, Scott completed 45 of 69 passes for 491 yards and three touchdowns.

The Wildcats are the first team to throw for more than 400 yards against Stanford since Oklahoma in the 2009 Sun Bowl.

"We have a great set of receivers and Matt's been throwing the ball great," Arizona receiver Austin Hill said. "We took advantage of a lot of their secondary miscues."

But when it absolutely had to stop Arizona, the Cardinal found a way.

Trailing by a touchdown midway through the fourth quarter, Stanford forced the Wildcats into a three-and-out. Nunes took over with 5:43 left -- more than enough time to direct the game-tying drive.

"They did a great job showing run ... then throwing a slant route before our linebackers could get to their spots," Thomas said.

"At the end, we just went back to our technique, calling some of the base plays that we know how to run effectively. That's what got it done."