North Carolina State survived three fumbles and three second-half Virginia touchdowns for a 31-27 victory in an Atlantic Coast Conference game tonight.

The Wolfpack, unbeaten in two games, dominated the first half while rolling to a 31-7 lead. But two fumbles, both inside the Virginia 15-yard line, prevented possible game-clinching scores, and the Cavaliers turned a third fumble into an easy touchdown as what started as a rout became a near thing before 45,800 fans.

Virginia, which scored its final touchdown on Tommy Vigorito's 26-yard run with 3 1/2 minutes to play, threatened again with two minutes to play. But State reserve linebacker Marion Gale intercepted Tod Kirtley's pass near midfield and sentenced the Cavaliers to their first loss. Virginia had blanked Richmond, 31-0, last week.

Time of possession was meaningful for the Wolfpack, who had the ball for 14 1/2 minutes more than Virginia.

"We just got started a little late," said Virginia Coach Dick Bestwick. "I'd like to think that no one is going to score 31 points on us in one half anymore. This is not the same Virginia team that you've been used to seeing. We're not happy anymore with close losses. I'm not, the kids are not and I hope our fans are not."

State's fans, meanwhile, were satisfied to escape with a win after watching the first-half lead all but melt away. State controlled the ball for 18 1/2 of the first 30 minutes and got three short touchdown runs by quarterback Scott Smith, a 21-yard field goal from Nathan Ritter and Smith's 69-yard TD pass to Mike Quick.

Virginia's only first-half score came on Greg Taylor's three-yard run. It was set up by an 81-yard run by Tommy Vigorito, who finished the game with a career high 192 yards on 17 carries. Vigorito also clicked off runs of 45 and 26 yards, the latter for the fourth-quarter touchdown.

Vigorito scored on a four-yard run early in the second half and Virginia's other score came on Kirtley's six-yard pass to Ted Marchibroda.

Billy Ray Vickers moved into fifth place on State's rushing list with 157 yards on 30 carries.

"We had turnovers in the second half which we didn't have in the first and our defense didn't stop them," said State Coach Bo Rein. "They have a very, very explosive offense, which could match any in the league. We are a good football team, but we do need a lot of improvement."