PASADENA, Calif. (AP) — Brett Hundley passed for 189 yards and ran for 131 more, and No. 25 UCLA pulled its season back from the brink with a dominant defensive performance in a 17-7 victory over No. 14 Arizona on Saturday night.

Paul Perkins rushed for a touchdown and Hundley threw a 70-yard TD pass to Jordan Payton during the decisive third quarter. The Bruins (7-2, 4-2 Pac-12, No. 22 CFP) stayed in the Pac-12 South race with their first home victory in nearly two months.

READ MORE: Young Boy Dead, 2 Others Wounded In Wilmington Shooting

Anu Solomon went 18 for 48 for 175 yards on a nightmarish offensive night for the Wildcats (6-2, 3-2, No. 12 CFP), who couldn’t score in the final 57 minutes. Arizona has lost three straight to UCLA since coaches Rich Rodriguez and Jim Mora joined the Pac-12.

Cayleb Jones caught a TD pass on Arizona’s opening drive, but its prolific offense was shut out by UCLA after that.

Arizona was on the edge of the national title race until this nightmare offensive game against the Bruins, who held the Wildcats to 255 total yards — nearly 287 yards below their season average. Arizona hadn’t scored fewer than 26 points in any game this season.

Hundley tied Cade McNown’s UCLA career record with his 68th TD pass, while Perkins became the 13th rusher with a 1,000-yard season in school history.

Hundley also gave a chance to Arizona by fumbling with 4:32 to play, but Eric Kendricks blocked Arizona’s short field-goal attempt, and Anthony Jefferson returned it to midfield.

After falling out of the national title race with consecutive home losses to Utah and Oregon last month, UCLA eked out back-to-back road victories before this impressive defensive effort against Arizona.

READ MORE: Authorities Arrest Suspect Involved In Pursuit Of Suspected Stolen Vehicle, Possible DUI

The Bruins even overcame 11 penalties for 118 yards in the latest head-scratching display by the FBS’ most-penalized team in each of the past two seasons.

With the Bruins trading in their traditional blue jerseys for the debut of grey “L.A. Steel” alternate uniforms, the large Rose Bowl crowd watched an ugly first half in which both teams struggled with most of football’s basics.

The Wildcats’ struggles were due to their inefficient offense, and the Bruins’ woes were pretty much all about penalties: They committed 45 yards in penalties in the first 5 1/2 minutes and finished the first half with nine flags for 98 yards.

Myles Jack committed two 15-yard penalties on the Wildcats’ opening drive, twice negating third-down stops by the UCLA defense. Solomon hit Jones with a 14-yard fade for the first half’s only touchdown.

UCLA had scored on its first 30 drives inside the red zone this season before Ka’imi Fairbairn missed an early field goal. He made a 24-yarder in the second quarter after UCLA failed to take it in from the Arizona 1.

Arizona starting safety Jourdon Grandon was ejected in the first half on a targeting penalty.

MORE NEWS: Californians Could Soon Be Fined For Using Too Much Water

Perkins put the Bruins ahead with a short TD run in the third quarter to cap their first relatively smooth scoring drive of the night. On the first snap after another UCLA defensive stop, Hundley uncorked a 70-yard dart down the Bruins’ sideline to Payton for his record-tying score and a 17-7 lead.