PASADENA, Calif. — Kevin Hogan passed for 234 yards and two touchdowns and Stanford crushed No. 9 UCLA’s hopes for the Pac-12 South title and a College Football Playoff spot with a 31-10 victory Friday.

Devon Cajuste and Michael Rector caught scoring passes for the Cardinal (7-5, 5-4 Pac-12) as the two-time defending Pac-12 champions salvaged satisfaction from a down season by trouncing the Bruins (9-3, 6-3) for the seventh consecutive time.

With a dynamite 16-for-19 performance by Hogan and two rushing TDs from Remound Wright, Stanford snatched the South title away from UCLA, which needed a victory to advance to the conference title game. Instead, the Bruins flopped in another big game and Stanford handed the division crown to Arizona or Arizona State.

“We had very good preparation,” Hogan said. “We knew what looks they were going to be in, and I got great protection. We had a lot of fun.”

Brett Hundley passed for 146 yards in likely his final home game for the Bruins, losing a matchup with Hogan for the fourth time in three years.

After an up-and-down season, an inspired Hogan made sure the Cardinal didn’t miss top receiver Ty Montgomery, who sat out with a shoulder injury. Hogan completed his first 12 passes, scrambled for key yards and showed poise in the pocket, particularly in avoiding a sack before uncorking a 37-yard TD throw to Cajuste 41 seconds before halftime to cap a 92-yard drive.

Just six days after a blowout win over rival Southern California, UCLA retained none of that momentum or passion in its third home loss of the season. The loss ended the Bruins’ five-game winning streak, which had given them an outside shot at the four-team playoff after a slow start to their season.

After joining UCLA’s seniors for a pregame ceremony, Hundley said farewell to the Rose Bowl with a tentative, ineffectual effort, getting sacked four times while the Bruins were shut out for the final 41 minutes.

Backup Jerry Neuheisel finished the game after Hundley left with UCLA on the Stanford goal line midway through the fourth quarter.

Coach Jim Mora’s defense also rarely slowed down the Cardinal’s deliberate offense, which outgained UCLA 436-262 and had the ball for nearly 38 minutes.

For all his success in a three-year revival of the UCLA program, Mora still hasn’t beaten Stanford or Oregon.

The Cardinal are comfortable in Pasadena after playing here on the last two New Year’s Days, and Hogan sparked the Pac-12’s lowest-scoring offense to a dominant, clock-chewing performance that measured up with Stanford’s best efforts during its current renaissance.

Hundley hit Thomas Duarte with a sharp TD throw to cap a strong opening drive on a beautiful 80-degree day in Arroyo Seco, but Stanford answered with an impressive half of offense after several poor weeks.

The Cardinal made two 75-yard scoring drives capped by Wright’s TD dive and Rector’s sliding catch of an impressive 22-yard TD throw by Hogan. While Hundley struggled, Hogan capped his magnificent half with a late TD throw to Cajuste, putting Stanford up 21-10. Hogan went 14 for 15 for 189 yards and two TDs before halftime.

The Cardinal went 80 yards on their first drive of the third quarter, capped by Wright’s 2-yard run. Stanford’s physical defense repeatedly shut down Hundley, who reverted to the indecision and panic of his worst performances at UCLA.

UCLA retired Troy Aikman’s No. 8 jersey in a halftime ceremony, honoring the quarterback who led the Bruins to a No. 1 ranking and a Cotton Bowl victory in 1988 before heading to the Dallas Cowboys for three Super Bowl victories.