At a quarter past midnight under the Wasatch Mountains, they were toasting Mario Cristobal’s Ducks again.

Oregon bounced back from last week’s road flop in Salt Lake City with an unsteady 31-29 victory over Arizona State on Saturday in front of a late-night crowd of 50,485 at Autzen Stadium.

“Good evening, almost morning,” Cristobal said at his postgame press conference in the wee hours. “When you play that hard, it’s great to see that type of reward.”

The Ducks (7-4, 4-4) matched last year’s win total under Willie Taggart entering the season finale at Oregon State.

The Utes (8-3, 6-3), who won 30-7 at Colorado earlier Saturday, clinched the South Division for the first time.

Herm Edwards and the Sun Devils (6-5, 4-4) could have made it to the Pac-12 championship game with wins over Oregon and Arizona to close the season.

But Manny Wilkins' two-point conversion pass failed as wide receiver Frank Darby’s foot was ruled out of bounds.

Justin Herbert, a potential first-round NFL prospect, struggled in the second half of what would be his final home game should he opt to enter the draft after the season.

Despite completing only three passes after the intermission, the junior quarterback was able to line up in the victory formation after an offsides penalty by Arizona State gave the Ducks a first down and a chance to run out the clock.

Herbert finished 19-for-34 passing for 262 yards, and freshman running backs Travis Dye and CJ Verdell combined for 175 yards rushing.

The Pac-12’s leading rusher, Eno Benjamin, finished with 149 yards on the ground, and star wide receiver N’Keal Harry caught seven passes for 105 yards for Arizona State.

The Ducks’ battered defense forced the Sun Devils to settle for three field goals and helped secure the win with a late turnover.

“I know they made some big plays,” Cristobal said. “But we did a good job (defensively).”

After Herbert’s tipped pass on third-and-5 was intercepted by freshman safety Cam Phillips at the Arizona State 46-yard line, the visitors had a chance to steal the game with a late field goal.

On a third-and-9, outside linebacker La’Mar Winston forced Wilkins to fumble. Junior defensive end Gus Cumberlander, filling in for an injured Jalen Jelks, recovered the ball with 3:02 remaining.

The Sun Devils recovered their four previous fumbles in the game. Oregon lost both of its fumbles, and Herbert was picked off twice.

“Those things are fixable, but they’re frustrating,” Cristobal said of the turnovers. “A couple of them (were) inexcusable.”

After shredding Arizona State’s defense in the first half, the Ducks mustered only 41 yards (2.4 yards per play) in the third quarter.

Jaylon Redd dropped what would have been an 85-yard touchdown pass from Herbert. Brandon Ruiz’s 29-yard field goal, which cut the Sun Devils’ deficit to 28-16, was the only scoring play in the third quarter.

“I think we started pressing,” Cristobal said. “You could see it in our players, we dropped some balls and had the turnovers.”

Cumberlander registered his second sack of the game to force Michael Sleep-Dalton’s eighth punt of the game, but Ugo Amadi muffled the kick at the Oregon 47.

On fourth-and-3 at the Oregon 25, Brandon Aiyuk slipped through some tackles for a touchdown on a screen pass to make the score 28-23 with 11:01 remaining.

Tony Brooks-James tried to wake the Ducks from their second-half slumber with a 56-yard kickoff return, but the offense bogged down in the red zone.

Adam Stack’s 28-yard field goal gave Oregon a 31-23 lead with 9:06 remaining.

Wilkins’ 1-yard touchdown with 4:35 remaining got the Sun Devils within two points

Herbert threw an 18-yard swing pass to Verdell and a 57-yard frozen rope to Dillon Mitchell for touchdowns in the second quarter.

Oregon piled up 364 yards of offense on 44 plays — 21 rushes for 115 yards and 23 passes for 249 yards — before the intermission.

“We got rolling and we got rolling quickly,” Cristobal said. “That’s the type of football we got accustomed to playing during the first half of the season.”

Herbert avoided a sack and ran for 11 yards to move the chains on the first drive of the game. Travis Dye broke off runs of 23 and 22 yards before Verdell scored a 6-yard touchdown run to give the Ducks a 7-0 lead.

On a third-and-4 at the Oregon 12, Benjamin was dropped for an 8-yard loss by Amadi.

Brooks-James lost a fumble at the Arizona State 49, but Troy Dye broke up a pass by Wilkins on a third-and-8 at the Oregon 12.

Ruiz made field goals of 38 and 30 yards in the first half. A week earlier, Jim Leavitt’s defense also made stands in the red zone, but Matt Gay’s six made field goals helped the Utes escape with the win.

Cristobal was livid with the officials after they ruled Arizona State recovered a strip-sack by Austin Faoliu when the ball appeared to be pinned under Gary Baker’s 310-pound body. Justin Hollins was flagged for an unsportsmanlike penalty after the dustup around the dog pile.

But the Ducks responded by forcing a punt.

Oregon appeared to be in complete control with a 21-6 lead when Herbert was intercepted by freshman rover Aashari Crosswell, who returned the turnover to the Oregon 22-yard line, where he was tackled by the 6-foot-6, 237-pound quarterback.

Wilkins threw a touchdown pass to Frank Darby on the next snap to get the Sun Devils within 21-13 with 50 seconds remaining in the second quarter.

Herbert atoned for his signal-caller sin by quickly moving the Ducks down field to set up an 8-yard touchdown run by Redd with 11 seconds left in the half.

“Our guys were determined on that drive to get that momentum back,” Cristobal said. “There was a legitimate look in their eye. They wanted to execute and they got it.”