Colorado overcame a 22-point first-half deficit to upset No. 5 Texas 91-89 on Saturday behind 33 points from Alec Burks and 21 from Levi Knutson.
Colorado (18-11, 7-7 Big 12) was down 48-33 at halftime, but the Longhorns (24-5, 13-2), who used their superior size and athleticism to take control early, suddenly were affected by the altitude and the Buffaloes' push-the-pace style that led to first-year coach Tad Boyle's biggest win in Boulder.
Because of issues at the free throw line — where Burks, an 84 percent shooter, missed eight shots — the Buffs had to sweat out the final minute.
The loss dropped Texas into a tie for first place in the Big 12 with No. 3 Kansas, which beat Oklahoma 82-70.
J'Covan Brown and Jordan Hamilton led Texas with 21 points each, but the Longhorns went 8½ minutes without a field goal as Colorado climbed back into it behind Burks, who scored 11 in points a 14-0 run early in the second half.
Knutson scored 13 points after halftime and Burks scored 24 points in the second half.
The Buffaloes went ahead 81-70 on Austin Dufault's tip-in with less than 3 minutes remaining, but Texas wasn't about to go down quietly.
Brown hit three free throws with 38 seconds left to make it 85-80. After Knutson's two free throws, Hamilton's 3-pointer with 30 seconds left pulled Texas to 87-83.
Cory Higgins stepped on the baseline on the inbounds, turning the ball over with 29 seconds left, but Hamilton was long on a 3-pointer and Burks corralled his 10th rebound.
He missed his eighth free throw before making one to make it 88-83.
That's when Hamilton's long 3-pointer made it a two-point game with 18 seconds left.
Burks was fouled again with 14 seconds remaining and this time he made both for a 90-86 lead.
Hamilton misfired a 3-pointer and Higgins hit one of two foul shots, and Cory Joseph hit an uncontested 3 at the buzzer as the student section at the record fourth sellout at the Coors Events Center this season stormed the court.
The Buffs ended a six-game skid against Texas, which lost for the second time in three games.
Early on, it looked like a laugher for Texas, which took control with a 16-0 first half run and led 43-21 on Gary Johnson's three-point play.
After Dufault's jumper got Colorado within 45-31, Brown pulled up at the top of the key, calmly swished his fourth 3-pointer and then spun toward the crowd, smiling and admonishing them to "Shhh!" as he sauntered down court.
The Longhorns did little to quiet the crowd after that.
Colorado outrebounded Texas 43-39, outshot them 53 percent to 42 percent in the Longhorns' last visit to Boulder before the Buffaloes bolt to the Pac-12 next season.