TUCSON, Ariz. (AP) Southern California clicked on both sides of the ball, overcoming a rash of penalties while building a 24-point lead.

Then the offense bogged down. Two fumbles were lost in the fourth quarter. The penalties kept piling up.

What appeared to be an easy road victory turned into an ugly one.

Aca'Cedric Ware ran for 197 yards and two touchdowns, and USC overcame a mountain of penalties to hold off Arizona for a 24-20 victory Saturday night.

''The one thing I love about our kids is they're realists,'' USC coach Clay Helton said. ''To be able to come out of here with a victory and know there's still more on the bone is a good thing.''

USC (3-2, 2-1 Pac-12) dominated the Wildcats while building a 24-point third-quarter lead, but lost two fourth-quarter fumbles to let Arizona (2-3, 1-1) back in it. The Trojans also had 18 penalties for 169 yards, including a pass interference call that negated an interception in the fourth quarter.

Arizona's Gary Brightwell scored on a 1-yard run with 1:40 to play, but Lucas Havrisik missed the extra point and USC recovered the onside kick.

''We didn't play very well,'' Arizona coach Kevin Sumlin said. ''Really, after that first drive of the second half, our defense did a good job.''

JT Daniels managed the Trojans offense well in the first half before the Trojans went stagnant in the second. He completed 16 of 24 passes for 197 yards and lost a fumble to set up Khalil Tate's 32-yard touchdown pass to Cedric Peterson.

Tate threw for 232 yards and two touchdowns, but was limited to 38 yards rushing. J.J. Taylor, who had 284 yards rushing against Oregon State last week, was held to 50 yards on 18 carries.

''USC did a nice job of challenging us,'' Sumlin said.

The Trojans controlled Arizona on both sides of the ball while building a 17-0 halftime lead.

USC racked up 281 total yards in the first half, scoring on Vavae Malepeai's 1-yard run in the first quarter and Ware's 26-yarder in the second. The Trojans stymied the Wildcats' offense, limiting them to 116 yards while intercepting a pass by Tate to set up Michael Brown's 42-yard field goal.

Arizona caught a break when a facemask penalty - USC's ninth penalty of the half - tacked on to a 20-yard completion gave the Wildcats a chance for a field goal with no time on the clock. Marvell Tell blocked Havrisik's 28-yard field-goal attempt, preserving the first-half shutout.

The second half continued the same as the first: Arizona gained 13 yards before punting on its first drive, Ware ripped off a 69-yard touchdown run.

Arizona's offense finally showed some life with Tate connecting on two long throws. The second one, 33 yards to Stanley Berryhill III, cut USC's lead to 24-7.

The Wildcats recovered a fumble at USC's 32-yard line after sacking Daniels early in the fourth quarter and Tate hit Cedric Peterson for a 32-yard touchdown on the next play, cutting the lead to 10.

Arizona got another score, but took too long in getting it and couldn't get the ball back.

''We just need to play a complete game in all three phases,'' Arizona linebacker Colin Schooler said. ''If you look at our losses, we haven't done that.''

THE TAKEAWAY

USC had a good rhythm going in the first half offensively, but labored after Ware's second TD run. And those penalties. The Trojans have plenty to clean up in their week off.

Arizona took too long to get going, unable to fight all the way back from a 24-0 deficit.

RUN DOMINANCE

With a freshman quarterback starting in his first conference road game, USC's coaches didn't want to put any extra pressure on Daniels. That meant running the ball - a lot.

The Trojans ran 47 times for 253 yards and threw it just 24 times, mostly underneath and mid-range passes. Daniels tried a couple of shots downfield, but couldn't connect. He didn't really need to the way USC was running the ball.

''We came in here saying we didn't want to put a young quarterback in a hostile atmosphere,'' Helton said. ''We wanted to lean on the run and he would make the plays.''

UP NEXT

USC has a bye week before hosting Colorado on Oct. 13.

Arizona plays at No. 24 California next Saturday.

Copyright 2018 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.