TUCSON, Ariz. -- Nic Grigsby raced 57 yards for a touchdown with 2:57 to go, and Arizona rallied from a 15-point deficit to defeat Stanford 43-38 on Saturday night.
The Wildcats ended a wild night in the desert by repelling the Cardinal on fourth-and-10 at Arizona's 17, with cornerback Trevin Wade batting down a pass intended for Chris Owusu in the end zone.
Nick Foles threw for 415 yards and three touchdowns as the Wildcats (4-2, 2-1 Pac-10) overcame a big night by the Stanford offense. Cardinal tailback Toby Gerhart ran for 123 yards and two touchdowns, and Andrew Luck threw for 423 yards and three scores. He also had an interception.
The Cardinal (4-3, 3-2) had their four-game winning streak in Tucson snapped.
The game turned when Stanford, leading 38-36, went for it on fourth-and-1 at Arizona's 8 with 5:27 to go.
The natural call would have been a handoff to the hard-charging Gerhart, but he limped off before the play. Luck found Owusu in the flat, but Owusu dropped the ball.
Given new life, the Wildcats rallied on Grigsby's dramatic run on third-and-17 from the Arizona 43-yard line.
With Stanford in pass defense, the shifty Grigsby took a delayed handoff, danced through traffic at the line and then broke down the left sideline, outrunning the secondary to the end zone as the Arizona Stadium crowd of 53,479 erupted.
The Cardinal responded in a heartbeat.
Luck kept the drive alive by scrambling for a first down on fourth-and-5 in his own territory, then hit Doug Baldwin for 36 yards to the Wildcats' 17 with 50 seconds remaining.
But that's where the drive died, as Luck missed on his last three passes, including one that glanced off Ryan Whalen's fingertips in the end zone.
The two teams combined for more than 1,100 yards of offense in a game that evoked memories of old-style, run-and-gun Pac-10 football.
Arizona and Stanford haven't both finished in the upper division of the Pac-10 since 1995. But both teams entered this game with dreams of contending for the title in the wide-open conference race.
Leading 31-29 midway through the third quarter, the Cardinal seemingly took command with a 6-play, 86-yard march. The big play was a 47-yard strike down the middle from Luck to Owusu, setting the Cardinal up at Arizona's 2.
Gerhart barged over on the next play to give the Cardinal a 38-29 lead.
Arizona's Greg Nwoko burst up the middle for a 43-yard touchdown to trim the deficit to 38-36 with 10:06 to go, setting the stage for the memorable finish.
The first half was just as wild as the second, with the teams combining for 48 points and 547 yards in the first 30 minutes.
Arizona jumped ahead 7-0 less than three minutes into the game when cornerback Robert Golden picked off a Luck pass and raced 79 yards for a touchdown.
Luck answered with a 30-yard scoring strike to a wide-open Jim Dray to tie it at 7-7.
Foles hit David Douglas for a 43-yard touchdown, and Arizona led 13-7 after Stanford blocked Alex Zendejas' extra point try.
Stanford reeled off 21 unanswered points in less than 13 minutes. Gerhart scored on a 2-yard run, and then Luck threw touchdown passes to Whalen and Owusu to put the Cardinal ahead 28-13.
The Wildcats rallied late in the half on a masterful drive by Foles, who led Arizona 89 yards in 12 plays and 2:36. Foles hit Terrell Turner on an 11-yard slant with 18 seconds remaining to cut the lead to 28-20 at halftime.
Florida State coach Jimbo Fisher hopes quarterback Sean Maguire is ready to go full speed by the middle of June.
Graduate transfer quarterback Davis Webb has officially joined California, giving the Golden Bears an experienced option to replace No. 1 overall NFL draft pick Jared Goff.
First-year football coach Dino Babers, hired by former Syracuse AD Mark Coyle, is on the committee that will search for Coyle's replacement.
Hugh Freeze has some major holes to fill on offense with the departures of Laremy Tunsil and Laquon Treadwell, but there is Chady Kelly and good depth.
After transferring in from Montana State, Dakota Prukop has a checklist he's working from as he prepares to compete for the Oregon job.
The destination for Week 6 of the Big 12 Ultimate Road Trip is unanimous, as all three conference reporters would head to the Red River Rivalry.