TUCSON, Arizona (Ticker) -- Stanford may be the only team in the nation that is not intimidated by Arizona's home court.
Matt Lottich scored 20 points and buried a clutch 3-pointer in the final minute as the Cardinal posted an 82-77 victory over the top-ranked Wildcats in a Pac-10 Conference matchup.
Stanford was one of only two visiting teams to win at McKale Center last season and duplicated the feat in its return. The Cardinal has won its last three road games against the Wildcats since losing here on March 9, 2000.
Arizona had its 10-game overall winning streak snapped and lost here for the first time since Stanford's previous visit, a span of nine games.
"I don't know if Arizona was as ready to play as they usually are," Stanford coach Mike Montgomery said. "For us to come in here and beat them three years in a row is tremendous."
"This was a big step," Lottich added. "Beating Arizona at Arizona is not easy to do. They are still the toughest team in the Pac-10 right now."
The Wildcats may have been distracted by a recent off-court controversy. They were accused of robbing approximately $80 in candy bars and change from a hotel vending machine during their stay in Kansas, where they won Saturday.
"The off-court stuff was a distraction," Arizona coach Lute Olson said. "They've had great success against us here and we've had great success against them at Stanford. Stanford made the shots they needed to make to win it."
The Cardinal had a 75-71 lead before Luke Walton and Jason Gardner made consecutive baskets to forge a tie with 1:58 left.
Nick Robinson followed with a bank shot to give Stanford (15-5, 6-2 Pac-10) the lead for good and grabbed a rebound off Gardner's miss at the other end. Lottich drained his fifth 3-pointer for an 80-75 cushion with 60 seconds to go.
Rick Anderson made a follow shot at 43 seconds for Arizona (15-2, 7-1), but Gardner missed a potential game-tying 3-pointer with nine seconds remaining.
Julius Barnes sank two free throws with 8.5 seconds left to seal Stanford's fourth straight win.
"Our team has grit," Montgomery said. "We didn't play as well as we are capable of. When it came down to crunch time, we made about four or five clutch plays of a different variety to win it.
"Matt hit the big three and Nick got a big rebound and Julius made the big free throws at the end. We just made the big plays when we needed them."
Barnes had 14 points and 10 assists and Rob Little collected 13 points and nine rebounds for the Cardinal.
"Julius helped me get some great shots," said Lottich, who made 8-of-14 shots, including 5-of-8 3-pointers. "The defense was sucking in to him and he was kicking the ball out to me. I got some great looks because of that."
Gardner scored 22 points and Walton added 18 for the Wildcats, who have lost two straight to the Cardinal for the first time since 1996.
The Wildcats shot just 44 percent (27-of-61) from the floor, made only 14-of-26 free throws and committed 19 turnovers.
"You can't make the number of turnovers we did and you can't make only 14-of-26 free throws," Olson said. "I don't know how many of those were front ends of 1-and-1s. At one point we missed seven straight free throws."
Salim Stoudamire, who scored a career-high 32 points against Kansas, was held to just three points on 1-of-5 shooting and committed three turnovers.
"We saw on the Kansas tape, you can't let Stoudamire just catch and shoot," Montgomery said. "So we didn't zone much and tried to prevent him from open shots."
"He had a terrible game," Olson said. "He'd be the first to tell you that."