Top-ranked Virginia, on the verge of panic for the first time this season, got the benefit of a controversial call and some clutch free-throw shooting down the stretch to escape from North Carolina State, 51-46, tonight in Atlantic Coast Conference play.

The victory, coupled with Wake Forest's surprisingly easy 84-68 triumph over North Carolina at Chapel Hill, left Virginia with a 2 1/2-game conference lead over Wake (7-2) and a three-game lead over the Tar Heels (7-3) in ACC play.

Virginia went into the game at Reynolds Coliseum riding a nation's-best 25-game winning streak (10-0 in the ACC, 21-0 overall this season), but appeared to be on the ropes after the Wolfpack (2-9, 12-10) scored six consecutive points for a 42-39 lead with 3:25 to play. At this point, 7-foot-4 center Ralph Sampson (17 points, nine rebounds) was playing with four fouls and Jeff Lamp (16 points), who kept Virginia from sinking out of sight in the first half, had been shut down by State's Dereck Whittenburg.

"We had them, they were ready to panic," said State point guard Sidney Lowe, whose steal and layup, two assists and two free throws had helped the hosts go ahead. "But, like in boxing, to win the title you have to knock out the champion."

The State players and Coach Jim Valvano felt official Charles Watkins' jump ball call should have been ruled a foul against Jeff Jones and that the call turned the game around. Valvano reflected on the previous play when Jones made a follow basket that cut the Pack lead to a point, 42-41, with 2:56 remaining.

"You become so concerned about the Lamps and Sampsons, you tend to forget about the other players," said Valvano. "He (Jones) hurt us with that basket."

State, which did a good job of keeping Sampson from dominating the middle and was patient on offense, was controlling the ball, looking for a good shot when Jones attempted to steal the ball from Whittenburg (14 points). The State guard went down on the floor, sure he was going to get a trip to the line.

Watkins ruled Jones had a hand on the ball and whistled a jump ball. Valvano was incensed.

"It happened right in front of me," Valvano said. "I don't mind losing if the opposition makes a super play, a steal or a tough shot. You can live with that. But a couple of unbelievable calls turned the game around."

Said Jones, "I had my hand on the ball, not his body. There was some contact, but only because he saw me coming and ducked his head."

Whittenburg saw it differently: "I thought I was fouled. But even so, I still won the jump and we should have had the ball back."

The high-jumping sophomore easily outleaped Jones, but Virginia's Lee Raker got to the ball and raced for a layup to put the Cavaliers up, 43-42, with 2:12 to play. Raker was fouled before he went up for the shot but no whistle was blown.

State missed on its next possession. Lamp gave his team a three-point cushion when he knifed down the lane and laid up a soft shot with 1:24 to play.

But State, which relied strictly on its long-range jump shots, again cut the deficit to a point, 45-44, on a 20-footer by Art Jones with 1:09 left.

Virginia played keep away until Whittenburg fouled Othell Wilson. The freshman point guard hit both ends of the one-and-one situation and the Cavaliers had some breathing room, 47-44, with 34 seconds left.

"We did a good job keeping Lamp off the foul line in the critical situations and look what happens," Valvano said. "We send three different guys to the line and they make all their shots."

After a hurried 14-foot, off-balance basket by Whittenburg, State quickly fouled Raker. The forward made his two attempts and Virginia led 49-46, with 13 seconds to play. Sampson closed out the scoring with two more from the line with one second remaining.

"We just played well down the stretch and, let's fact it, we had to do just that to win," said Cavalier Coach Terry Holland. "We made the foul shots when it counted."

Holland sensed his club, ranked first by the AP and second by UPI, was in for a long night when it was unable to get untracked offensively in the first half. State's relentless pressure prevented Sampson from setting up near the basket and forced him into two quick fouls, sending him to the bench early.

Luckily for the Cavaliers, Lamp scored 12 points on a variety of jump shots despite good defense by Whittenburg to keep his team in the game. Still relying on perimeter shooting, Whittenburg connected on three long jumpers and Lowe made a pair, including a bank shot at the buzzer, as State trailed, 23-22 at intermission.

State finally edged ahead on Lowe's steal and layup, 36-35, before Sampson made two straight baskets for a 39-36 Virginia lead.