The Wildcats pulled out tight wins against good teams in both, a sign that they may be back on track.
Deandre Ayton had 13 points and 10 rebounds, and Arizona held on to beat No. 7 Texas A&M 67-64 on Tuesday night.
"I was happy we were able to embrace the challenge," Arizona coach Sean Miller said. "I think this was our best defensive effort of the year."
Arizona (6-3) picked up a big win against UNLV on Saturday and notched an even bigger one in front of a pro-Wildcats crowd that made Talking Stick Arena feel like McKale Center west.
It wasn't easy.
Texas A&M (7-1) pulled within 63-62 on Tyler Davis' jump-hook with 17 seconds left. Brandon Randolph twice hit 1 of 2 free throws, sandwiched around a travel by Davis, and Duane Wilson was fouled on a 3-point attempt with 2 seconds left. He made two after missing the first attempt, and Dylan Smith made two at the other end to put Arizona up 67-64.
Texas A&M's Robert Williams missed badly on a long 3-pointer to send the Wildcats rushing off the bench and the Aggies to their first defeat.
Davis led the Aggies with 21 points and 10 rebounds.
"We survived traveling all over the road and to play well and give ourselves a chance tonight, I'm proud of that fact," Texas A&M coach Billy Kennedy said. "But I thought we didn't do enough things in the second half defensively."
Texas A&M moved up two spots in the AP Top 25 this week after beating No. 25 Southern California and Texas-Rio Grande Valley last week.
Arizona dropped out of the AP Top 25 from No. 2 after a disastrous 0-3 trip to the Bahamas, becoming the first team since Louisville in 1986 to fall out from No. 2 to unranked.
The Wildcats bounced back to rout Long Beach State at home, though Miller went on a long postgame rant about his team's defensive effort. Arizona had more defensive problems in the first half at UNLV, but rallied to beat the Runnin' Rebels 91-88 in overtime.
The Wildcats had some shaky defensive moments and a rash of turnovers early but turned up the defensive pressure, holding the Aggies to 1-for-11 shooting during a 13-2 run to take a seven-point lead.
Texas A&M rallied as the Wildcats kept passing the ball to them on sloppy turnovers and took a 31-29 lead at halftime despite Williams going scoreless and taking one shot.
Texas A&M held up well on a neutral court that wasn't exactly neutral, but couldn't make enough plays down the stretch.
Arizona appears to be back on track after its disappointing trip to the Bahamas.
"Guys stepped up and made plays down the stretch," said Ayton, who made 4 of 9 shots.
The game was physical from the start, but one thing was missing in the first half: Free throws.
Neither team shot a free throw until 1:07 was left in the first half and each team shot two.
That changed in the second half. Arizona went 19 for 22 from the line in the second half and Texas A&M went 5 for 8.
"They were 20 for 24 from the free-throw line and we shot 10 free throws" Kennedy said. "You can't give good teams that kind of advantage, especially on the road."
Texas A&M hosts Prairie View A&M on Saturday.
Arizona has another tough game on Saturday, when it hosts Alabama.
For more AP college basketball coverage: http://collegebasketball.ap.org and http://twitter.com/AP_Top25
Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.