The Wildcats had been swept at home by USC and UCLA the previous weekend and had lost seven of their last 11 games, raising the possibility that their 22-year string of NCAA men's tournament appearances might end.
"We had to do something," Arizona's Ivan Radenovic said.
Chase Budinger scored 23 points for the Wildcats (18-9, 9-7 Pacific 10), who won despite a season-low point total.
The Sun Devils (7-20, 1-15) are 2-11 in games decided by five points or fewer.
Arizona Coach Lute Olson chuckled when asked if he had a handle on his inconsistent team after 27 games.
"I don't have a handle on them," he said. "You could see that in the last three seconds when we fouled a three-point shooter with a four-point lead.
"I maybe need a sledgehammer sometimes, but not a handle."
Stanford 56, USC 53 -- With Candice Wiggins resting a nagging hamstring injury, the eighth-ranked Cardinal (25-4, 17-1) rode the strong inside play of freshman Jayne Appel to beat visiting USC and win the Pac-10 title outright. Appel scored 12 of her 14 points in the second half, including a go-ahead basket with 36 seconds left.
"We've got the No. 1 seed. Even if we didn't, I could not justify risking Candice in that situation," Stanford Coach Tara VanDerveer said. "I was not going to entertain even listening to her telling me how good she felt."
Shay Murphy's 13 points led USC (16-12, 10-8).