In an intense struggle worthy of an Olympic or NCAA final, Virginia, the top-ranked college basketball team in the country, outlasted the Soviet National team, the amateur world champion, 94-87, tonight in double overtime.

A three-point play by junior transfer Rick Carlisle broke an 86-86 tie in the second extra period and the Soviets, with five players lost on fouls, could not rally.

Because Ralph Sampson missed a free throw and Othell Wilson did not, overtime was necessary. As regulation time wound down, with the Soviets two points ahead at 78-76, Valdis Valters missed what would have been the clinching shot and Sampson was fouled on the rebound.

Five seconds remained when Sampson missed his first free throw. On the second, he deliberately hit the backboard high, with the ball catching the rim and bouncing out to Wilson, who was fouled with four seconds left. He made both tries and the sellout crowd of 10,716 sat back down.

After Virginia took an 84-78 lead in the first overtime, the Soviets, with only one starter left, 7-2 Arvidas Sabonis, rallied to tie it up. Then they gained possession and drew a foul with 18 seconds remaining, but chose to take the ball out of bounds.

With Sampson playing good defense, Sabonis was unable to click on a move from the lane, and then Wilson missed a long try at the buzzer.

Two free throws by Wilson, on a foul vigorously protested by Soviet Coach Aleksandr Gomelsky, put Virginia ahead in the second extra period. Then, after Sabonis tied it with a pair of foul shots, Carlisle broke the game open.

Jim Miller followed up a miss by Carlisle for a 91-86 margin and victory for the Cavaliers was assured when Sabonis fouled out with 1:56 remaining. Earlier, three other Soviet starters -- 7-2 Aleksandr Belostenny, Voldemaras Khomicus and Valters -- had fouled out, while Sergei Yovaisha left with an injured leg.

They did not leave quietly. Valters, called for his fifth foul in the first overtime, threw the ball into the stands. Belostenny, moments later, gave the officials a rude gesture as he departed. Both were assessed technical fouls, essentially meaningless under international rules. So was Gomelsky after he threw threw a towel onto the court in disgust.

This was only the second loss for the Soviets in eight games on their U.S. tour and their effort was remarkable, since they had beaten Vanderbilt Tuesday night and rarely substituted until it was forced upon them. Meanwhile, Virginia Coach Terry Holland rushed players in and out, except for Sampson, who went 46 minutes, and Wilson, who played 43.

There were more turnovers than field goals in the first half, in which Virginia took a 35-21 lead but lost all except four points of it in just two minutes. The Soviets, even at 2-2, did not catch up again until Sabonis' turnaround jumper made it 74-74 with 2:22 left in regulation.

Sampson frequently produced uproar from the crowd with nine blocked shots, leaving Belostenny shaking his head after two stuffs two seconds apart. Sampson also got 25 rebounds as Virginia outrebounded its opponents, 60-38.

Sabonis and Wilson were the high scorers in the game with 21 apiece. Carlisle, who transferred to Virginia from Maine, had 20.