D.J. Strawberry scored a career-high 27 points, Mike Jones had 18, and Maryland rallied to beat the Tar Heels 89-87 Sunday and extend its winning streak to five games.
"We could have given up. We're not going to give up," Strawberry said. "We're going to keep fighting. I wanted to win so bad."
North Carolina (24-5, 10-4 Atlantic Coast Conference) had a chance to force overtime with 3.5 seconds left, but Brandan Wright missed the first of two free throws and the Tar Heels failed to control the rebound of his second misfire.
"This is very frustrating," North Carolina center Tyler Hansbrough said. "We can't crumble whenever the game gets tight. We have to be tough."
The Tar Heels' five losses this season are by a combined 21 points.
"We lacked focus. We didn't convert the way we should down the stretch," forward Reyshawn Terry said. "We had another breakdown. We keep hitting the same wall. It's making me a little nervous, honestly."
As the final buzzer sounded, fans rushed the court to celebrate the Terrapins' first win over North Carolina in six tries since Jan. 14, 2004.
James Gist had 12 points for Maryland (22-7, 8-6). Before their five-game run, the Terrapins were 3-6 in the ACC and in danger of missing the NCAA tournament for a third straight season.
Now, after being all but written off three weeks ago, Maryland is all but assured a return trip.
"You get criticized around here when you lose," Terrapins coach Gary Williams said. "That's part of the deal, I guess, when you've won a national championship (in 2002)."
"They've got themselves right back in it," North Carolina coach Roy Williams said.
Maryland trailed 77-65 with 7:14 left before Jones scored nine points in a 16-3 run to give the Terrapins their first lead.
"That's what a team is," Terps center Ekene Ibekwe said. "We kept on fighting when we were down."
After Terry scored for North Carolina, two free throws by Ibekwe put Maryland back in front.
Terry then made two foul shots with 1:40 left, but Strawberry countered with a layup. Ibekwe followed with a steal and sank two free throws to give the Terrapins a three-point cushion with 1:11 to go.
It was 89-84 before North Carolina's Wayne Ellington made a 3-pointer. The Tar Heels got the ball back after a Maryland turnover, setting up Wright's missed free throws.
Hansbrough scored 22 points and Ellington had 17 for North Carolina, which went 8-for-17 at the foul line.
"I don't think we are showing what we need to be showing right now to achieve our goals," Terry said.
Roy Williams was seeking his 100th win in 127 games with North Carolina; no coach has ever been quicker to get 100 wins at an ACC school. The record is 128 games, held by Vic Bubas of Duke.
A sellout crowd of 17,950 assembled on a snowy day to see if the Terrapins could extend their longest ACC winning streak since 2003 and end their lengthy skid against North Carolina. Early on, it appeared that neither would occur.
Maryland missed 10 of its first 13 shots as North Carolina built a 13-point lead 7 minutes into the game. The Terrapins eventually found the mark, however, and got within three at halftime before pulling even early in the second half.
Three straight baskets by Strawberry made it 48-all with 17:24 left, the first tie since the opening tip. North Carolina then got two straight baskets before Maryland did the same.
Wright followed with a dunk and Danny Green made a layup, igniting an 8-1 spurt that made it 60-53.
It was 62-57 before successive baskets by Alex Stepheson and Ellington put the Tar Heels up by nine. The margin swelled to 12 before Maryland launched its comeback.
Elington scored 12 points, and the Tar Heels overcame a 29-15 rebounding deficit to take a 44-41 halftime lead.
After Hansbrough opened the scoring with a basket and Maryland answered with a free throw, Ellington made two foul shots and added a 3-pointer for a 7-1 lead. Five more points by Ellington made it 12-5, and Maryland's Greivis Vasquez hit a runner in the lane before Hansbrough sank a layup to start an 8-0 run that put North Carolina up by 13.
It was 34-25 before the Terrapins recharged the crowd with seven straight points, including a dunk by Gist and a three-point play by Strawberry.