COLLEGE PARK, Md. (AP) - North Carolina State played excellent defense, never let down after falling into an early hole and staged a fine comeback in the second half.
Unfortunately, that wasn't enough to offset an uncharacteristically miserable offensive showing by the best-shooting team in the country.
Alex Len dropped in a missed shot by teammate Pe'Shon Howard with 00.9 seconds left, giving Maryland a stunning 51-50 victory over the 14th-ranked Walfpack on Wednesday night.
Howard drove the left side and came up short on a 5-footer, but the 7-foot-1 Len grabbed the ball in front of the rim and eased it through the hoop. After the Wolfpack failed on a desperation heave at the other end, thousands of students in the sellout crowd poured onto the court after the final buzzer to mark Maryland's first win over a ranked team since March 3, 2010, against No. 4 Duke.
Lorenzo Brown scored 17 points for NC State (14-3, 3-1 Atlantic Coast Conference) and C.J. Leslie had 13. The Wolfpack came in leading the NCAA with a 52.8 shooting percentage, but in this one they shot 31.1 percent.
"We were offensively pretty bad," coach Mark Gottfried said. "We bobbled balls, we had shots around the rim we couldn't make and it wasn't one guy. That was one of those nights. You're going to have those and we haven't had a lot of them this year."
Maryland shot 34 percent and committed 13 turnovers. North Carolina State did just about everything required to win except put the ball in the basket.
"I thought we played pretty good defense," forward Scott Wood said. "We just couldn't throw the ball in the ocean if we were standing next to it."
Coming off a win over then-No. 1 Duke, the Wolfpack trailed by 10 with 9:34 left before coming back. Brown hit a jumper with 1:41 remaining to put North Carolina State up 50-49, and neither team scored again until Len's game-winner.
"I thought our defense and our effort was phenomenal and our fight to get back in the game a couple of times was unbelievable," Gottfried said. "We started the game off 10 down, we were down nine or 10 in the second half and fought right back and put ourselves in a position to win."
Len, with 10 points, was the only Terrapin to score in double figures. Maryland led for much of the game but needed Len's basket to end NC State's 10-game winning streak.
Maryland (14-3, 2-2) has won 10 of 11 against the Wolfpack, including five straight at home. The Terrapins had previously lost 17 straight against ranked teams.
"I didn't come here to be mediocre," Maryland coach Mark Turgeon said. "I came here to do great things. We haven't done many great things since I've been here. This is a great thing."
Down 45-43, the Wolfpack pulled even on a follow-shot by Richard Howell and took their first lead on a 3-pointer by Wood with 4:37 to go. But NC State never found its shooting touch - Wood finished 3 for 13, including 3 for 11 from beyond the arc.
"They played really good defense, and when we had opportunities to knock down shots we usually make, we didn't," Wood said.
Asked if this negated the win over Duke, Gottfried said, "They all count as one. We're going to move on."
Maryland led 30-21 early in the second half before Brown made a pair of baskets - including a driving dunk - during a 9-2 run that cut the margin to one point.
James Padgett then scored for the Terrapins and Jake Layman popped a 3-pointer to make it 37-30. Minutes later, a 3-pointer by Howard put Maryland ahead 40-31, and a driving layup by teammate Dez Wells made it a 10-point game.
The Wolfpack went 6 1/2 minutes without a basket before a driving layup by Leslie cut the deficit to 42-35. That was part of an 8-0 spurt that got NC State to 42-40.
A horrid first half ended with Maryland leading 22-16 despite shooting 30 percent, going 0 for 6 from 3-point range and committing seven turnovers.
The Wolfpack needed more than 7 minutes before getting onto the scoreboard and shot 23 percent (7 for 31) in its lowest-scoring half of the season.
Maryland got off a solid start, getting two baskets apiece from Seth Allen and Shaquille Cleare in going up 10-0. The Wolfpack opened 0 for 6 with three turnovers.
Howell ended NC State's scoring drought with a layup at the 13:52 mark, and then the Wolfpack missed their next six shots. Maryland also went cold, missing 16 straight field-goal tries over a span of nearly 12 minutes. Howard snapped the dry spell with a driving layup to put the Terrapins ahead 16-13.