Brandon Ashley added 17 points while playing with foul trouble in the Wildcats' 10th straight win in the rivalry.
Arizona tied the game at 52 with 14:34 left on Ashley's three-point play and went ahead on his three-pointer the next time down the floor in a decisive sequence that helped the Wildcats pull away.
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 three-pointers, came in needing 12 points to reach the 2,000-point plateau and got it on a three 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.
Anthony Brown added 18 points and nine rebounds as the Cardinal dropped to 9-1 at home in Maples Pavilion and had a three-game winning streak snapped with just its second defeat in nine games.
Washington 52, at Colorado 50: Andrew Andrews connected on a straightaway jumper with one second remaining, lifting the Huskies past the short-handed Buffaloes for their third win in a row.
Colorado was without two of its best players. Josh Scott remained sidelined because of a back injury and Xavier Johnson sat out to serve a one-game suspension for violating a team rule.
Arizona State 79, at California 44: Bo Barnes matched his career high with 17 points off the bench, Kodi Justice had 16 and the Sun Devils pulled away with a big run in the first half to beat the Golden Bears.
Arizona State scored 22 unanswered points and held California scoreless for more than 13 minutes in the first half to earn its second consecutive win after opening conference play with four straight losses.