Deandre Ayton had 29 points and 18 rebounds, Allonzo Trier scored 20 of his 25 points in the second half and Arizona outlasted Alabama 88-82 Saturday night.
Arizona's first real home test and the fans were ready, making McKale Center louder than it's been all season.
The Wildcats (7-3) responded with their second quality win of the week, backing up a victory over No. 7 Texas A&M with a strong all-around performance to win their 45th straight nonconference home game.
Alabama (7-3) matched Arizona nearly shot for shot in one of college basketball's toughest road environments, pulling within 84-80 on Riley Norris' 3-pointer with 38 seconds left.
Trier, who took just six shots, hit three free throws in the final 34 seconds to seal it for Arizona.
Freshman Collin Sexton scored 21 of his 30 points in the second half to keep the Crimson Tide close.
Arizona's defense was a sore spot to start the season, leading to three straight losses in the Bahamas that dropped the Wildcats out of the AP Top 25 from No. 2 - a first since Louisville in 1986.
Even when the Wildcats rolled over Long Beach State, coach Sean Miller lamented their defensive effort in a 25-minute postgame rant.
Arizona shored up its defense on Tuesday, when it grinded out a 67-64 victory over No. 7 Texas A&M in Phoenix.
For their first big home test, the Wildcats got back sophomore guard Rawle Alkins, a tough, emotional player who Miller hoped would give them a lift.
Arizona had a spark before Alkins even entered the game, efficiently working its offense during a 10-0 run that put the Wildcats up 24-13. The Crimson Tide fought back behind their defense, using a 13-2 run to tie it at 26-all.
Alabama had no one who could stop Ayton in the first half - 15 points and nine rebounds - but Sexton banked in a 3-pointer at the buzzer to put the Tide up 40-38.
The Crimson Tide went on a quick run to start the second half, but Arizona rallied and the teams traded athletic plays, neither to gain much separation.
Alabama closed in around Ayton to limit his shots, but Trier got free multiple times to keep the Wildcats around the lead.
Sexton was Alabama's go-to player, confidently stroking in long 3-pointers and driving to the basket.
Alabama came up short, but handling a hostile environment at McKale Center and keeping it close against a good team should only help the Crimson Tide later in the season.
Arizona could find itself back in the AP Top 25 next week after two quality wins.
Alabama hosts Mercer on Dec. 19.
Arizona plays at New Mexico next Saturday.
Copyright 2017 The Associated Press. All rights reserved.
7831 N. Business Park Drive
Tucson, AZ 85743