STANFORD, Calif. (AP) In a physical, tightly officiated matchup for first place in the Pac-12, Arizona had to find a flow in a game that completely lacked one because of all the whistles and interruptions.
It took a big second half from Stanley Johnson, Brandon Ashley and some key minutes by role players off the bench.
Johnson had 19 points and seven rebounds and No. 7 Arizona handed Stanford its first home loss of the season with an 89-82 victory Thursday night. Ashley added 17 points while playing with foul trouble in the Wildcats' 10th straight win in the rivalry.
''It was a really unique game,'' coach Sean Miller said. ''We were in dire straits because of our foul trouble. It's not easy to play through those moments.''
Arizona (17-2, 5-1 Pac-12) tied the game at 52 with 14:34 left on Ashley's three-point play and went ahead on his 3-pointer the next time down the floor in a decisive sequence that helped the Wildcats pull away.
''That was a big stretch,'' Miller said.
Neither Johnson nor Ashley were made available postgame despite multiple media requests.
Chasson Randle scored 26 points and became just the third Stanford player to reach 2,000 points and 15th in conference history. UCLA's Jason Kapono was the last to reach the milestone in 2003.
Randle, already Stanford's career leader for 3-pointers, came in needing 12 points to reach the 2,000-point plateau and got it on a 3 in the final minute of the first half that helped put the Cardinal ahead at the break in a game featuring seven lead changes and nine ties. Randle made all 10 of his free throws.
But few of his chances came easily against Rondae Hollis-Jefferson's swarming defense.
''They always play us tough,'' Arizona's Gabe York said. ''We were coming in for a fight. It was just a matter of us making the right plays and making enough plays to win.''
Anthony Brown added 18 points and nine rebounds as the Cardinal (13-5, 4-2) dropped to 9-1 at home in Maples Pavilion and had a three-game winning streak snapped with just their second defeat in nine games.
''For us, it's about stops,'' Stanford coach Johnny Dawkins said. ''We didn't get enough stops. They were able to get stops. It was a matter of who was going to defend.''
Arizona moved back into a first-place tie in the Pac-12 standings, holding Stanford close to its 73.1 scoring average with a large contingent of Wildcats fans among the near-sellout of 6,943 fans.
Ashley scored Arizona's initial six points, and the Wildcats crashed the offensive boards to create second and third chances early.
Arizona hit 11 of its first 16 shots on the way to a 26-17 lead midway through the first half. But Stanford capitalized when the Wildcats cooled off - during a 1-for-7 stretch - and tied the game at 31 on Randle's two free throws with 4:36 left in the half.
''The bottom line is we lost. We need to fix things we didn't do right and then flush it and get ready for Arizona State,'' Randle said. ''It's an opportunity gone, especially being at home. It stings a little bit.''
Stanford outshot Arizona 54.5 percent to 53.8 on the way to a 41-39 halftime edge.
About 18 scouts representing 16 NBA franchises were credentialed for the game, which was part of Coaches vs. Cancer week with coaches sporting sneakers and suits.
In a game featuring 51 fouls, 28 against Stanford, it was tough for either team to establish much flow.
''I think they were fouls,'' Dawkins said. ''It just made the game a little more disjointed.''
Arizona: Freshman 7-foot center Dusan Ristic fouled out with 8:48 remaining with no points in 11 minutes. ... The Wildcats played on the road for the fifth time in eight games. ... They scored 16 points off Stanford's 14 turnovers. ... Arizona had been holding opponents to 58.8 points.
Stanford: Stanford faced its fourth Top-25 opponent this season. ... The Cardinal haven't beaten Arizona since a 76-60 home victory on Jan. 4, 2009. ... In need of a practice player and a big body, Stanford added 6-foot-7, 288-pound offensive lineman Nick Davidson from the football team. He might even get in a game, with Dawkins saying, ''Well, you never know with us.''... The program's other two 2,000-point scorers are Todd Lichti (2,336) and Adam Keefe (2,319). ... The Cardinal held a 29-25 rebounding advantage.
Arizona: At California on Saturday.
Stanford: Hosts Arizona State on Saturday.