Matt Scott had 469 total yards and accounted for four touchdowns, helping Arizona overcome a huge day by Southern California's Marqise Lee to beat the 9th-ranked Trojans 39-36 on Saturday.
Lee caught 16 passes for a Pac-12-record 345 yards and two touchdowns to help USC (6-2, 4-2 Pac-12) build a 15-point lead midway through the third quarter.
But Scott led Arizona (5-3, 2-3) back, throwing for 369 yards and three touchdowns, including a 7-yarder to David Richards that put the Wildcats up 39-28 with just over 5 minutes left.
The Trojans answered quickly with Silas Redd's second rushing touchdown, from 10 yards, but remain stuck on 799 wins as a program after Matt Barkley's last-ditch pass into the end zone was swatted down.
Scott finished 27-for-50 passing and ran for 100 yards before missing Arizona's final possession with an undisclosed injury.
Austin Hill had 10 catches for 259 yards to help the Wildcats hold on for the upset victory after coming up just short against the Trojans a year ago.
Barkley threw for 493 yards and three touchdowns on 31-of-49 passing, but threw two interceptions. USC had five turnovers and 13 penalties for 117 yards as its national championship hopes faded.
These two teams put on an offensive show last season in the Coliseum, trading big plays while combining for over 1,100 yards. The Trojans won that one 48-41, surviving Arizona's second-half comeback thanks to Barkley's school-record 468 yards and four touchdowns passing.
They spent the first half of the rematch trying to get out of their own way.
Barkley threw his two interceptions — and nearly several others — and overthrew tight end Xavier Grimble in the end zone on a fourth down. Redd also lost a fumble in the first half and safety Jawanza Sterling lost a fumble on an interception return.
USC also had some discipline problems, getting eight penalties for 79 yards in the first half. One of those was a taunting call against safety T.J. McDonald that extended Arizona's opening drive, which Scott capped by hitting Johnny Jackson on an 8-yard touchdown pass.
Arizona had a few discipline problems of its own.
The Wildcats had to settle for John Bonano's 27-yard field goal in the first quarter after a holding call by Fabbians Ebbele negated Carey's 1-yard touchdown run. Another holding penalty, on Michael Cooper, wiped out a 27-yard field by Bonano, who pushed his 10-yards-farther attempt wide right as time expired in the half.
USC managed to shake off its mistakes behind some big plays in the first half by Barkley and Woods.
Barkley connected with Grimble on a 12-yard touchdown early in the second quarter, then found Lee late, hitting him in stride for a 49-yard touchdown that put the Trojans up 14-10.
Lee kept getting open and Barkley kept finding him, setting up a 3-yard touchdown run by D.J. Morgan that put the Trojans up 21-13 late in the second quarter.
Lee had 12 catches for 255 yards in the first half and opened the second with a 44-yard touchdown catch to put USC up 28-13 and break the Pac-12 record of 293 yards receiving set by Oregon State's Mike Hass against Boise State in 2004.
Seemingly in control, the Trojans let the lead slip away.
Scott scored on a 10-yard run, then found Dan Buckner on a 9-yard touchdown pass to pull Arizona within 28-26 after the Wildcats recovered a fumble by Morgan.
The Wildcats sniffed out a double reverse on fourth-and-2, stopping Lee a yard short, and marched 72 yards for a 7-yard touchdown run by Carey that put Arizona up 32-28 after the 2-point conversion failed.
Scott extended the lead to 39-28 with his TD pass to Richards and — after Redd's TD run and a 2-point conversion — the Wildcat defense held on the last play of the game, swatting down Barkley's final heave into the end zone for the program's biggest win under new coach Rich Rodriguez.