HARTFORD, Conn. -- Chasson Randle scored 22 points and Stanford handed No. 10 UConn its first loss of the season, 53-51 on Wednesday night.
Josh Huestis added 13 points and Dwight Powell had 10 points and 15 rebounds for Stanford (8-2), which overcame a 10-point halftime deficit in earning their first signature win of the season.
DeAndre Daniels had 15 points for UConn (9-1), which was 6 of 10 from behind the arc in the first half and 0 for 12 in the second.
Randle's jump shot with 3 1/2 minutes left gave the Cardinal a 52-49 lead. The Huskies pulled within a point when Daniels tipped in a missed 3-point attempt by Niels Giffey.
But Shabazz Napier missed three shots in the final 40 seconds with a chance to put the Huskies ahead. He gave up an opportunity on UConn's final possession, passing the ball to Omar Calhoun, whose 3-pointer from the right wing bounced off the rim.
Stanford came in 0-4 against UConn and had not beaten a Top 25 team away from Palo Alto since the 2008 NCAA tournament.
The Cardinal's previous seven wins came over teams that were a combined 32-41.
Napier, who finished with 12 points and eight assists, missed two 3-pointers on a key possession with the Huskies trailing 52-51. Stanford got the ball back with 28 seconds left after a scrum underneath the basket.
Napier fouled Huestis on the inbounds play and he hit one of two foul shots.
Napier, who beat Florida with a jumper at the buzzer earlier this month, missed another shot with 8 seconds left, forcing UConn to foul again.
He got the ball back on a rebound after Huestis missed another free throw attempt. He dribbled down the court, but instead of trying a shot, he passed to Calhoun.
UConn led by 10 points at halftime and pushed the lead to 43-30, before consecutive 3-pointers by Anthony Brown and Randle. That started a 14-0 run by the Cardinal, who used a stifling zone defense to hold the Huskies without a field goal for more than 6 minutes. A driving basket and free throw by Randle gave Stanford its first lead of the second half at 44-43.
Napier's jumper from the lane put UConn back on top 45-44 with just over 10 minutes left and the teams went back and forth.
The Huskies closed the half on a 14-3 run that ended when Napier stole the ball from Randle and found Lasan Kromah ahead of the field for an easy layup just before buzzer.
UConn came in shooting better than 46 percent from beyond the arc, with five players having made 10 or more 3-pointers.
Connecticut was coming off its annual hiatus for final exams. The Huskies had not played in 12 days, since a 95-68 win over Maine, a game in which UConn hit 14 3-pointers.
Stanford ended a 13-day break last Saturday with a 27-point win over UC Davis.
UConn plays at Washington, another Pac-12 team, on Saturday. The Huskies had dominated that conference, coming into Wednesday they were 17-2 and had won 13 straight since falling to UCLA in the 1995 NCAA West Regional championship.
Stanford's two losses came early in the season at home to BYU and to Pittsburgh in the Legends Classic on Nov. 26 in Brooklyn. The Cardinal return to the Barclays Center to face Michigan on Saturday.