Wayne Ellington added 28 points for the Tar Heels (22-2, 7-2 Atlantic Coast Conference), who needed a frantic comeback to preserve their perfect record against the Tigers in Chapel Hill. North Carolina has won all 53 meetings, setting an NCAA record for the longest home winning streak against one opponent.
Cliff Hammonds scored 31 points to lead the Tigers (17-6, 5-4), who seemed on their way to ending the long- running streak. They led by 11 points with about 3 minutes left in regulation before the Tar Heels went on a 14-3 run to force the extra periods.
Hansbrough came up a point shy of matching his career-high, going 11-for-16 from the field and 17-for-19 from the foul line. He added 13 rebounds. Meanwhile, Ellington -- who scored 36 points and hit a last-second 3-pointer to beat Clemson in January -- came up with a tough driving shot past Raymond Sykes in the final minute of the second OT to help seal it.
Tar Heels point guard Ty Lawson was sidelined for the second game in a row with an ankle injury.
Hansbrough knocked down a straightaway shot to put the Tar Heels ahead to stay, then hit two free throws to make it 94-90 with 3:28 left in the second overtime.
It didn't look like a comeback was possible early. North Carolina committed turnovers on its first five possessions fell behind 8-0 in the first 2 minutes, and managed just nine points in the first 9 minutes against the Tigers' fullcourt pressure.
The Tigers, meanwhile, looked completely relaxed and unburdened by their past in Chapel Hill. They led by 11 points at halftime and handed North Carolina its largest deficit of the season in a second half that left the home crowd stunned.