At times, the University of Maryland played some pretty wretched football tonight. But every time the Terrapins simply had no other choice but to make the crucial play, they did, especially in the fourth quarter, and beat North Carolina State, 31-17, in Carter-Finley Stadium.

The Terrapins had played themselves into a 17-17 tie in the fourth quarter with perhaps as many as a dozen misplays against a team that lost to Division I-AA Furman by 20 points here a week ago.

But a four-yard touchdown run by Alvin Blount with 3:27 left in the game put Maryland ahead, 24-17. And the Terrapins added another score a minute later when quarterback Stan Gelbaugh ran 19 yards after the Terrapins sacked N.C. State quarterback Erik Kramer and caused him to fumble.

Maryland Coach Bobby Ross acknowledged the mistakes his team made, like two fourth-down fumbles, an interception, and terrible third-down defense. But he was clearly happy to beat an N.C. State team (1-4) he kept saying all week wasn't as bad as its record.

"I'm not going to downplay the way we played," Ross said. "N.C. State was very ready to play. Yes, in the first half nothing went right; we weren't getting anything done . . . It was amazing, the amount of things (that were going wrong). But we came back from (trailing) 10-0 and hung on. I don't know what more you could ask of them."

N.C. State Coach Tom Reed didn't want reporters to ask anything of him. "I have absolutely nothing to say," Reed said before walking away.

The Terrapins trailed, 10-0, in the second quarter and would have been down, 17-3, except that linebacker Chuck Faucette forced a goal-line fumble. That turned out to be worth 14 points, as Maryland drove 99 yards to tie the game just before halftime.

Maryland took a 17-10 lead on the first series of the second half, moving 74 yards in just four plays and 51 seconds. But the Wolfpack came back to tie at 17 on Kramer's touchdown pass to Phil Brothers with 10 minutes to play.

And even after Maryland (3-2) had broken the tie with a 64-yard, eight-play drive, victory was not guaranteed because N.C. State had gobbled up yards at will all night.

But on the first play after the ensuing kickoff, Maryland's Bruce Mesner sacked Kramer and Scott Tye recovered the ball to secure for the Terrapins an Atlantic Coast Conference victory over a team it was favored to beat by nearly three touchdowns.

Gelbaugh completed 14 of 24 passes for 237 yards. More importantly, he made every play he had to. He completed five of six passes for 87 yards in the 99-yard drive at the end of the first half, including the 17-yard touchdown pass to Eric Holder (five receptions, 125 yards) that tied the game.

Maryland ran that two-minute drive to perfection, and Ross said, "I was really glad to see our passing game get untracked. We should have thrown more . . . but that was my fault."

Still, without Faucette's fumble-forcing play, that drive wouldn't have been possible.

Kramer completed 28 of 43 passes for 325 yards, most of it coming on short passes to his running backs who had 13 receptions.

N.C. State had gone down inside the Maryland one-yard line and had first-and-goal. On the previous play (third-and-short), Tye said he had noticed how the Wolfpack lineman submarined to allow the back to go over the top.

"I went over to Chuck and said, 'I know they're coming over the top again,' " he said. And Faucette, who had forced N.C. State's Vince Evans into a leaping, goal-line fumble last year, agreed.

Indeed, Mike Miller tried to go over the pile, but Faucette was already there.

"I looked up, and it was like he had hit a brick wall," Tye said of the hit.

Faucette knocked the ball loose and Keeta Covington recovered at the one. "The play of the game," Tye stated, accurately.

Maryland's defense came up with the identical play last week at Michigan, but Rick Badanjek fumbled on the next play, and the Wolverines scored to take a 17-0 lead.

The Terrapins knew they were going into their two-minute offense. Ross wanted more than Ramon Paredes' 40-yard second-quarter field goal on the board at halftime.

Gelbaugh recalled thinking in the end-zone huddle, "We've gotta get this ball out of here. But my first concern was not giving it right back like we did at Michigan. And another concern was not sticking Darryl (Wright, the punter) back there at the back of the end zone."

Stephon Scriber ran two yards to the three on first down. And Tommy Neal went 11 yards to the 13, giving Gelbaugh some operating room. Gelbaugh then threw a pair of 20-yard passes, first to Holder, then to the now-indispensable James Milling. And the Maryland offense was off.

But many of the problems came back in the second half. Gelbaugh had a pass tipped, then intercepted by Derrick Taylor. But Kelly Hollodick missed a 37-yard field goal for the Wolfpack.

A 27-yard punt by Wright (who otherwise had a superb game, with a 42.8-yard average) gave N.C. State possession at the Maryland 48. And it wasn't long before Kramer found Brothers, on another one of those short patterns, for what turned out to be a 34-yard touchdown play that tied the score at 17.

Faucette explained how N.C. State was able to operate its short passing game so effectively. The Wolfpack would run their tight end over the middle, and split both backs in pass patterns.

"That left only two linebackers (usually Faucette and Rich Petitbon) to cover three people," Faucette said.

Maryland did counter, he said, by bringing up safety Al Covington. But a lot of damage had already been done.

It was Faucette who sacked Kramer on third down to set up Maryland's go-ahead touchdown.

Ross and his coaching staff did quite a few things to confuse the Wolfpack defense. The Terrapins, after the two-minute drill, knew they could go downfield often, and did. Holder's 42-yard reception at the start of the second half was Maryland's longest offensive play of the season, setting up Badanjak's one-yard touchdown run.

For every Maryland miscue, there seemed to be a redeeming play. The Terrapins defense recorded nine sacks. Wright consistently came up with good punts (47, 48 and 53 yards). Paredes, who barely kept his starting job this week, nailed a 40-yard field goal that would have been good from 55.

Maryland now has two weeks (it is off next Saturday) to erase the mistakes. And the Terrapins can still enjoy the fact that they have won 12 straight official ACC games.