USC's defense spent a miserable week answering questions about its collapse and Hail Mary passes.
Coordinator Justin Wilcox was under fire from fans.
And the Trojans' offense was searching for what Coach Steve Sarkisian termed "explosive plays."
USC came back Saturday night, holding on to defeat previously unbeaten and 10th-ranked Arizona, 28-26, at Arizona Stadium.
The Trojans survived a fourth-quarter comeback and could not exhale until Arizona missed a 36-yard field-goal attempt with 17 seconds left.
"We knew coming in it was going to be like this," Sarkisian said.
Tailback Javorius Allen rushed for a career-high 205 yards and three touchdowns while the defense and special teams came up big when they needed to as the Trojans remained in the hunt for a Pac-12 Conference title.
That seemed like a longshot last week after USC melted down in the final four minutes against Arizona State at the Coliseum.
But the Trojans responded before a boisterous Arizona crowd and improved to 4-2 overall, 3-1 in the conference play.
"The end was intense," Allen said. "You just have to trust your defense and know they will make it happen."
The victory could serve as a turning point for a team that fell out of the top 25 and endured national ridicule after its confused defense surrendered a Hail Mary touchdown pass as time expired against Arizona State.
Arizona Coach Rich Rodriguez said last week that he expected USC players to be "refocused" after the Arizona State loss.
He was apparently correct.
USC just managed to fend off an Arizona offense that was averaging 574 yards and nearly 40 points a game.
The Trojans forced a fumble, got key sacks, blocked a field-goal attempt and got a huge performance from defensive lineman Leonard Williams.
"It was close but that is what USC is about, fighting on, and playing every second of the game," said Williams, who made eight tackles, including one to stop a possible tying two-point conversion. "We learned from last week."
USC quarterback Cody Kessler shook off his first interception of the season — a streak of 190 attempts — and completed 20 of 30 passes for 185 yards and a touchdown.
And the Trojans relied heavily on Allen.
The junior from Florida scored on runs of 34, 48 and one yard and carried piles of defenders for extra yards on other carries.
"He's one of the best running backs, if not the best back in the nation, when he's running like that," safety Su'a Cravens said.
USC led 14-6 at halftime on Allen's first two touchdowns and several key defensive and special teams plays, including Claude Pelon's sack and blocked field-goal attempt on the final two plays of the second quarter.
The Trojans extended the lead on their first second-half possession when Kessler connected with receiver Nelson Agholor for a 21-yard touchdown.
USC was ahead, 28-13, at the end of the third quarter.
Arizona, however, would not go quietly.
Early in the fourth quarter, quarterback Anu Solomon connected with running back Jared Baker on a 41-yard touchdown pass play to cut the Trojans' lead to eight points.
The Wildcats got the ball back with less than eight minutes left, but freshman defensive backs John Plattenburg and Jonathan Lockett broke up passes to force a punt.
Arizona got the ball with 3:27 left and drove 80 yards to score on Baker's one-yard touchdown with just over a minute left to make the score 28-26.
Cornerback Chris Hawkins was called for pass interference on Arizona's first try at a two-point conversion, but Williams stopped Baker on the next attempt, seemingly preserving the victory.
When Arizona receiver Cayleb Jones recovered an onside kick, the Wildcats got one final chance as Solomon moved them into field-goal range.
But just as Casey Skowron attempted the field goal, Sarkisian called timeout. The ball sailed through the uprights, but Skowron had to kick again.
This time, he missed, sending the Trojans back to Los Angeles happy.
"Generally speaking, it is hard to make two kicks in a row," Sarkisian said, "and I'd like to think some timing is involved."
Solomon completed 43 of 72 passes for 395 yards and a touchdown for Arizona, 5-1 overall and 2-1 in the Pac-12.
"Losing on that last play is not easy," Rodriguez said.
USC knows something about that.
But now the Trojans can move forward.