COLLEGE PARK, Md. (AP) -- Mike Glennon directed a frantic drive to set up a 43-yard field goal by Niklas Sade with 32 seconds left, and North Carolina State overcame a valiant performance by Maryland backup quarterback Devin Burns in a 20-18 victory Saturday.
After Sade's kick, the Terrapins moved 60 yards in five plays behind third-string quarterback Caleb Rowe before a 33-yard field goal try by Brad Craddock hit the left upright with two seconds remaining.
The Wolfpack (5-2, 2-1 Atlantic Coast Conference) trailed 18-17 and had no timeouts left upon getting the ball at their own 20 with 2:17 to go. Glennon completed a 14-yard pass to Quintin Payton on a third-and-10 and pushed N.C. State into field-goal range with a 14-yard completion to Rashard Smith.
Glennon went 23 for 47 for 307 yards and two touchdowns, and Bryan Underwood had six catches for 134 yards and a score. Underwood has caught a TD pass in seven straight games, the longest such streak in school history.
Burns replaced injured Perry Hills late in the second quarter and nearly produced a stunning victory for Maryland (4-3, 2-1) against all odds in the first extensive action of his college career.
Burns, a sophomore, rushed for 50 yards and completed 3 of 4 passes for 47 yards. He wasn't even on the depth chart at quarterback at the beginning of summer practice and ran only two plays this season before being pressed into action after Hills was carted from the field in the second quarter with what appeared to be a serious knee injury.
Maryland trailed 10-3 at halftime and 17-15 in the fourth quarter before rallying behind Burns and true freshman Wes Brown, who ran for 121 yards on 25 carries.
The Terps went up 18-17 on a 48-yard field goal by Craddock with 13:39 left, but the lead wouldn't stand up.
Hills' injury occurred while he was trying to make a tackle after throwing an interception. The quarterback was chasing David Amerson when he was flattened by Rickey Dowdy, who was called for an illegal block to the back.
Hills was thrust into the starting role in August after C.J. Brown tore his ACL. Hill helped Maryland win four of six games and was 12 for 20 for 159 yards in this one before leaving.
Burns, meanwhile, moved from quarterback to wide receiver in the spring of 2011, then switched back to quarterback during preseason camp after Brown's injury.
In spite of his lack of experience, Burns brought the Terrapins back against an N.C. State coming off a bye and two weeks removed from beating Florida State.
Maryland trailed 10-3 before a blocked punt and interference penalty set up a 1-yard touchdown run by Brown midway through the third quarter. The conversion kick failed.
On the first play following the kickoff, Underwood slipped free down the middle and was 10 yards behind the closest Maryland defender when he hauled in a rainbow pass from Glennon for a 68-yard score.
Undaunted, Burns directed a 74-yard drive that got the Terrapins to 17-15. After peeling off runs of 23, 5 and 14 yards in addition to completing a 38-yard pass to Marcus Leak, Burns scored on a bootleg from the 2.
The Wolfpack gained 18 yards on 12 plays in the first quarter while falling behind 3-0. Hills completed a pass to Leak for 47 yards on Maryland's second possession to set up a 36-yard field goal by Brad Craddock.
NC State bounced back with a strong second quarter, extending a season-long trend. Glennon went 3 for 3 for 71 yards in a 75-yard march that ended with the quarterback hitting wide-open fullback Logan Winkles over the middle for a 25-yard touchdown.
After a Maryland punt, Glennon completed a 28-yard pass to Underwood on a third-and-16, which led to a field goal for a 10-3 lead. Late in the half, Amerson picked off a Hills pass and went the distance, but the block-to-the-back penalty nullified the score.
The Wolfpack has outscored the opposition 62-13 in the second quarter this year.