CLEMSON, S.C. (AP) -- No. 1 North Carolina passed its first true test -- barely.
Wayne Ellington's 3-pointer with 0.4 seconds left in overtime lifted the top-ranked Tar Heels to a 90-88 victory over 19th-ranked Clemson on Sunday night.
After weeks of routing nonconference competition -- they had won their previous four games by an average of 33 points, North Carolina (15-0) found itself locked in a classic to start the Atlantic Coast Conference season and came out on top.
"It shows our maturity, it shows we can stick it out and get the win when we have to," Ellington said.
Ellington was the main reason that the Tar Heels managed to do that as he scored a career-high 36 points.
None were bigger than his final 3-pointer from the left side of the key after taking a pass from Ty Lawson on North Carolina's final possession.
Right from the moment it rolled off Ellington's fingertips, he knew the Tar Heels would head home happy and with the No. 1 ranking intact.
"It felt really good," Ellington said. Defender James Mays was "flying at me and I knew if it had chance to get there it was going to go in," Ellington said.
The Tar Heels leaped from the bench as Ellington pumped his fist in celebration.
Only moments earlier, Clemson freshman Demontez Stitt had hit two foul shots with 13.9 seconds to go that put the Tigers ahead, 88-87.
Instead, Ellington's basket sent the Tar Heels out of Littlejohn Coliseum with their seventh straight win over Clemson.
Ellington scored seven of North Carolina's nine points in overtime. He surpassed his career high of 23 set earlier this season in a win over Ohio State.
Tiger coach Oliver Purnell was pleased with Clemson's defense on All-American Tyler Hansbrough, held to just 12 points, 10 fewer than his average. Hansbrough did lead North Carolina with 14 rebounds.
"If you told me we're going to that job on Hansbrough, I'd feel pretty good," Purnell said.
Instead, it was Ellington who continually did in the Tigers.
"I didn't think he'd get 36," Purnell said. "33 would've been fine."
Lawson had 16 points. He jumped around with teammates after Ellington's basket.
"It felt joy to get a win, to get up and get out of here," Lawson said.
Clemson looked like it had the game won in regulation when Hammonds drove the lane uncontested by the Tar Heels to give the Tigers an 81-74 lead with 2:37 to go.
But North Carolina wasn't done.
Ellington nailed a 3-pointer and Danny Green followed with another to cut things to 81-80. Hansbrough, an 81 percent foul shooter this season, stood at the line with two shots, but missed the first before tying the game.
Ellington put up a straightaway 3-pointer from the top of the key that bounced off with 14 seconds left -- and gave Clemson a chance at victory.
The Tigers got three shots at the basket in the final seconds, but couldn't convert.
Purnell said win or lose, his club would use this game as a measuring stick for the rest of the ACC season.
"We're close, but we're not where we need to be yet," he said.
Their fans certainly were prepared. Decked out in orange T-shirts with Purnell's face and the words "Oliver Purnell's Posse," the sold-out crowd kept things raucous throughout.
The Tar Heels hadn't been in a nailbiter in weeks. Now that they have, they plan to take the experience with them this season.
"It was a test for us," Hansbrough said. "In the end we won. We didn't do the things we needed to do defensively at times. Hopefully, at the end of the year when we come into these situations, we'll be more prepared."
Jordan Men's North Carolina Tar Heels Michael Jordan White #23 Future Star Replica Basketball Jersey T-ShirtShop
Maryland point guard Melo Trimble, considered a lock to leave the program before struggling in the second half last season, has withdrawn from the NBA draft and will return for his junior season.
Louisville's Chinanu Onuaku, who recently underwent a medical procedure to correct a heart rhythm issue detected during the combine, will keep his name in the NBA draft pool.
Andrew White III will return to the Nebraska men's basketball team next season after removing his name from the NBA draft.