Josh Scott collected 17 points and 11 rebounds and Xavier Johnson had 14 points as the visiting Buffaloes handed the Cardinal their third straight loss.

Xavier Talton added nine points and five rebounds for Colorado (21-9, 10-7 Pac-12), which snapped a two-game losing skid and remained tied with Arizona State for third place in the Pac-12. Scott shot 9-of-11 from the foul line to help the Buffaloes match a school record for regular season wins.

Chasson Randle scored 17 of his 24 points in the second half and was 9-for-18 from the floor to lead Stanford (18-11, 9-8), but the rest of his teammates shot 12-for-39 from the field. Josh Huestis added nine points and 13 rebounds for the Cardinal, who missed seven of their 17 shots from the foul line and were outrebounded 39-31.

Colorado held Stanford to 31.3 percent shooting in the first half and led 33-28 at the break before going cold midway through the second half. Askia Booker was 3-for-10 from the field, but his basket gave the Buffaloes a 46-38 lead with just over 14 minutes remaining before they were held to two points over the next eight minutes.

Anthony Brown scored with four minutes left to put Stanford ahead 51-48 before the Buffaloes answered with seven consecutive points. Brown and Randle each missed 3-point shots in the final 20 seconds for Stanford, which shot 4-of-17 from 3-point range.

GAME NOTEBOOK: Colorado improved to 16-2 when leading at the half, while Stanford dropped to 3-9 when trailing at intermission. … Colorado G Wesley Gordon made his first start since Feb. 5 and finished with two points and five rebounds. … Stanford F Dwight Powell had eight points and two rebounds before fouling out with 2:01 remaining.