The Tar Heels, playing without injured ACC player of the year Ty Lawson, got all they could handle from the Hokies.
But Hansbrough scored the go-ahead basket with 36.1 seconds left - the 12th lead change of the second half
- and then he tied up J.T. Thompson in the lane for a jump ball that gave North Carolina (28-3) possession with 5.2 seconds to go. Coach Seth Greenberg of Virginia Tech (18-14) threw his jacket in disgust, believing Thompson was fouled.
Hansbrough was fouled on the inbounds, made two free throws and A.D. Vassallo, who scored 26 points to lead Virginia Tech, missed a 3-pointer at the buzzer that would have forced overtime.