Tyrell Terry hit a go-ahead 3-pointer with under two minutes to play and Stanford overcame a 12-point deficit to stun Washington 61-55.
Daejon Davis scored 12 points, including a game-tying 3-pointer, all in the second half for the Cardinal, who have won six of seven. The former Garfield star also dished out five assists.
Spencer Jones scored 14, Oscar da Silva and Terry each had 11.
Jaden McDaniels produced his first career double-double with 18 points and a season-high 15 rebounds for the Huskies, who were held scoreless over the final 3:12.
Nahziah Carter added 16 points for the Dawgs. Carter eventually fouled out with 23.7 seconds left in the game.
UW only shot 38.5% from the floor and had 21 turnovers in the loss.