Demarcus Holland scored on a stickback of his own free throw with 4.1 seconds left to help Texas hold on and beat No. 14 North Carolina 86-83 on Wednesday night.
Holland finished with 15 points for the Longhorns (10-1), who survived a missed 3-pointer from UNC's Marcus Paige on the final play to earn their sixth straight win.
Isaiah Taylor scored 16 points to lead Texas, while Javan Felix added 12 - including two key baskets in the final 2 minutes to answer a tying spurt from the Tar Heels (7-3).
Texas shot 38 percent after halftime and 40 percent for the game, but dominated the boards and scored 21 second-chance points to beat the Tar Heels for the sixth time in seven meetings.
Paige scored 23 points to lead UNC, which got senior Leslie McDonald back for the first time after missing the first nine games due to NCAA eligibility issues.
But in the end, the Tar Heels struggled to overcome a flat start as well as 23 missed free throws in what has become a recurring theme this season.
North Carolina, which had beaten highly ranked Michigan State, Kentucky and reigning national champion Louisville in the past month despite playing without McDonald and leading scorer P.J. Hairston due to those NCAA issues, trailed by as many as 13 points and spent much of the game fighting uphill.
UNC tied the game at 77 on Kennedy Meeks' three-point play with 2:14 left, but Felix knocked down a tough shot in the lane over Paige with 1:59 left. Two possessions later, he buried a 3-pointer over Paige to push the lead to 82-77 with 1:06 left.
The Tar Heels clawed within 84-80 on two free throws from Paige with 25.2 seconds left, then Paige followed with a 3 with 12.1 seconds to go to close the deficit to one. UNC put Holland on the line with 7.2 seconds left and he missed both, but he snatched the rebound in the lane and put up a shot that bounced around the rim before dropping through the net.
Paige got a good look on the final possession from in front of the UNC bench, but the shot rimmed out as the horn expired.
Texas and coach Rick Barnes suffered through a miserable 16-18 season last year, ending with a first-round loss in the CBI. But the Longhorns entered this one with five players averaging in double figures and had held seven of 10 opponents to under 40 percent shooting.
The Longhorns did more of the same against UNC, with four players reaching double figures while they held the Tar Heels to 39 percent shooting.
Most impressively, Texas took a 51-42 rebounding advantage, pulling down 20 offensive rebounds.
Jonathan Holmes added 15 points and 10 rebounds for Texas.
For UNC, McDonald scored 15 points with four 3-pointers after the NCAA announced hours before tipoff that the senior was cleared to return to competition after missing the first nine games.
The NCAA said McDonald must repay $1,783 to a charity of his choice for receiving improper benefits from "numerous individuals" during this spring and summer. That included the use of luxury cars, payment of parking tickets, a cellphone and lodging.
After the game, UNC issued a statement from athletic director Bubba Cunningham saying the school was still working with the NCAA on Hairston's status and expected to have the matter resolved by the end of the week.