LOS ANGELES (AP) — With a big lead almost gone and the shot clock winding down, a stroke of luck hit Arizona’s Lauri Markkanen.

Markkanen hit a rainbow 3-pointer with 33 seconds left, capping a 23-point effort as No. 14 Arizona held on late in a 73-66 victory over Southern California on Thursday night.

READ MORE: $50,000 Reward Offered For Clues In 2016 Murder Of DeAndre Hughes In Front Of His Watts Home

“I just looked at the shot clock and it said, ‘5 seconds,’ and I knew I had to make a play,” Markkanen.

With a 23-point lead erased down to three, Arizona worked the ball around the perimeter until it reached Markkanen on the left side outside the arc.

“I didn’t have time to run a ball screen,” said Markkanen who threw up a high-arcing rainbow that hit the backboard and somehow went in.

“I didn’t call bank, so you need a little bit of luck,” he said.

The Wildcats (17-2, 6-0 Pac-12) won their 12th consecutive game but had to hold on to the end as USC rallied from a 23-point deficit over the final 15 minutes.

“That is something we have to change,” Dusan Ristic said. “My personal opinion is that we got comfortable as a team. We stopped playing defense. They made some 3s, and got some energy from there.”

Rawle Alkins added 14 points, Kadeem Allen 11, and Ristic grabbed 12 rebounds for Arizona, which struggled against a zone defense and shot 40 percent overall but made 10 of 26 3-point attempts.

READ MORE: Motorcycle Driver Killed In Horrific Crash In West Hills

“If we get to the point in that locker room where we aren’t happy with a victory on the road against a tough USC team like that, this season isn’t going to be very fun,” Arizona coach Sean Miller said.

Elijah Stewart scored 20 points and Jordan McLaughlin added 14 points and eight assists for Southern California (16-4, 3-4).

“We’ve come back several times from deficits,” USC coach Andy Enfield said. “We had a chance to win it in the final 2 minutes but things didn’t go our way.”

Trailing 56-35 with 9:20 to play, the Trojans clawed back with a 17-4 run capped by Chimezie Metu’s three-point play that made it 60-52 with 4:47 to play.

The Trojans pulled within 64-57 when Stewart converted a rebound tip-in into a three-point play. Shaqquan Allen made two free throws twice in the final minutes, pulling USC within 67-64 with 1:03 to play and setting up Markkanen’s deciding shot.

Southern California managed to score just 21 points over the game’s first 25 minutes, falling behind 44-21 with 15:23 to play.

Leading 19-15, Arizona appeared to take control with a 23-6 run that carried into the second half, taking its biggest lead of the game at 44-21 on Keanu Pinder’s layin with 15:24 to play.

With the victory, the Wildcats avenged last year’s 103-101 quadruple-overtime loss to the Trojans at the Galen Center.

MORE NEWS: Annie Awards Ceremony Postponed, Moved To Virtual Format Due To COVID

(© Copyright 2017 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)