SALT LAKE CITY (AP) — The Arizona Wildcats had practiced all week to the energizing song "Jump Around," so when it boomed over the public address system in the fourth quarter, players and coaches found themselves dancing.

The Wildcats would go on to score 17 unanswered points in the fourth and defeat Utah 34-24 Saturday, guaranteeing the Utes their first losing season since 2002.

"When that song came on in the fourth quarter, we all went crazy," said Arizona quarterback Matt Scott. "We haven't won a road game in forever, so this one was big."

Ka'Deem Carey once again played a huge part, rushing for 204 yards. It wasn't the 366 he put up last week against Colorado, but it was equally impressive against the Pac-12's third-rated defense.

"That's pretty cool to get 200 yards in back-to-back games," Carey said. "I wasn't feeling my best before the game. I was trying to get away from Star (Lotulelei), and they kept lining him up on different sides so I just ran away from him."

Utah (4-7, 2-6 Pac-12) took a 24-17 on Travis Wilson's 36-yard touchdown pass to DeVonte Christopher late in the third quarter, but the Wildcats answered with touchdowns 3 minutes apart early in the fourth.

Daniel Jenkins tied it on a 2-yard TD run, and Scott tossed an 18-yard scoring pass to Austin Hill with 11:07 left.

John Bonano's second field goal of the night, a 24-yarder, sealed the win for Arizona (7-4, 4-4) with 1:15 remaining.

"Tough to see the seniors not come away with a win in their last game at Rice-Eccles Stadium, but they played hard. Everybody played hard. We didn't capitalize on some opportunities," Utah coach Kyle Whittingham said.

Wilson passed for a career-high 311 yards and two touchdowns, but also fumbled.

Utah scored on a fake field goal but saw the game turn in the fourth on a failed fake punt.

"It was there. The throw was just behind our guy," Whittingham said. "When he had to adjust back to catch the ball, that allowed the defender to catch back up, otherwise he was running for a lot of yards. It is what it is."

Scott was back after missing last week because of a concussion. He started slowly, but he ran for a touchdown and tossed the game-winner to Hill.

"The offensive line opened some real big holes," said Scott, who finished 12 of 27 for 160 yards.

Arizona did most of its damage on the ground, rolling up 320 yards rushing.

Carey averaged 7.8 yards a carry and scored Arizona's first touchdown.

Jenkins scored the third with 13:55 remaining.

He was stopped on third and 1 at the 4, but a hands-to-the face penalty against Lotulelei gave Arizona a first down at the 2. A missed tackle by Nate Fakahafua allowed Jenkins to bounce outside and score on the next play.

Arizona's much-maligned defense then held, forcing a punt. But Utah's coaches called for the fake.

Punter Sean Sellwood completed the pass to Mike Honeycutt on fourth and 6, but Honeycutt was stopped four yards stopped of the first down by Kylan Butler, giving Arizona the ball at the Utah 41.

"I thought that was the play of the game, without question, because if he doesn't make it, he might still be running," said first-year Arizona coach Rich Rodriguez.

Instead, Scott connected with Hill four plays later.

"I think he was sharp mentally," Rodriguez said of Scott. "But tonight, he just wasn't as accurate."

The teams combined for 929 yards of offense. While Utah held a 10-minute advantage in time of possession, mistakes hurt the Utes, who will see their string of nine straight bowl appearances end.

The Wildcats scored two touchdowns less than 90 seconds apart in the second quarter to take a 17-7 lead.

Carey's 1-yard run capped an eight-play, 75-yard drive and gave the Wildcats a 10-7 lead.

Wilson fumbled on Utah's next play from scrimmage as the ball slipped out of his hand as he dropped back to pass.

Five plays later, Scott practically walked into the end zone from 10 yards out. Utah had only 10 men on the field on the play as safety Brian Blechen was force to leave because of a problem with his helmet.

Utah answered with a nine-play, 70-yard drive, with Wilson's 34-yard TD pass to Jake Murphy pulling the Utes within 17-14.

Coleman Petersen, who scored on a second-quarter fake field goal, tied it at 17-all midway through the third on a 24-yard field goal.

Both teams blew scoring opportunities.

Utah's first two drives ended on failed fourth-down conversions, the second on fourth and 1 at the Arizona 4 as White was tackled for a 1-yard loss, six plays after Carey fumbled at his own 28-yard line.

Arizona was driving late in the second quarter and had a first and goal at the Utah 7, but Scott fumbled the handoff, and Fakahafua recovered with 33 seconds left in the half.

Going against the Pac-12's worst pass defense, Wilson had more yards passing in the first quarter (62) than he had in the entire game against Washington (55).

He also was much sharper, completing 11 of 15 passes for 133 in the first half and 28 of 40 overall.

In the end, it was the Wildcats dancing to a song written by House of Pain.