TUCSON, Ariz. (AP)Caleb Williams threw for 411 yards and five touchdowns, and No. 10 Southern California scored two touchdowns in the fourth quarter to outlast Arizona 45-37 on Saturday night.

The Trojans (7-1, 5-1 Pac-12) had an extra week to shake off their first loss of the season, an emotional 43-42 setback at No. 14 Utah.

USC fought off some early missed opportunities – one caused by the officials – against Arizona, racking up 621 total yards to match its best start since 2008. The Trojans have won 10 straight against Arizona.

The Wildcats (3-5, 1-4) nearly kept up with USC offensively, finishing with 543 total yards. Defensively, they struggled with missed tackles and allowed USC to convert 11 of 17 on third down.

Jayden de Laura threw for 380 yards and three touchdowns to Dorian Singer, the last a 5-yarder that cut USC’s lead to 45-37 with 1:26 left. USC recovered the onside kick to seal the victory.

Arizona kept it close most of the night.

Singer had a spectacular 23-yard touchdown catch from de Laura, fending off a defender to snare it one-handed, and Tyler Loop kicked two field goals.

Williams had a pair of first-half touchdown passes, but the Trojans also missed on some good scoring opportunities.

USC settled for a field goal on its first drive and Denis Lynch missed badly on a 56-yard attempt after Williams’ 30-yd TD pass to Terrell Bynum was called back by a holding penalty.

USC appeared to be in good position for more points just before halftime when Williams hit Rice on a 33-yard pass to Arizona’s 10. Instead, the officials started the clock before spotting the ball and Williams couldn’t spike it before time ran out, leaving USC coach Lincoln Riley incensed.

Williams found Tahj Washington on a 3-yard touchdown to open the third quarter, then found him again on a 47-yard score as he was being hit to put USC up 31-16.

Arizona rallied, closing to 31-29 on de Laura’s 19-yard TD pass and Michael Wiley’s 10-yard TD run on an option.

USC finally stretched the lead after that. Williams hit Kyle Ford on a 5-yard touchdown to open the fourth quarter and Travis Dye leaped in for a 2-yard TD run to make it 45-29.

THE TAKEAWAY

USC had a hard time shaking the Wildcats and had some breakdowns defensively with several key players out, but pulled out a tough road win to stay in the thick of the Pac-12 Championship race.

Arizona was able to keep it close most of the night behind de Laura and the offense. The Wildcats’ defense, a weak spot most of the season, let the upset slip through their fingers.

UP NEXT

USC hosts California next Saturday.

Arizona plays at No. 14 Utah next Saturday.

More AP college football: https://apnews.com/hub/college-football and https://twitter.com/AP-Top25 Sign up for the AP’s college football newsletter: https://apnews.com/cfbtop25