High-ranking Soviet officials have told South Yemen's prime minister -- declared the interim head of state today in a rebel radio broadcast from Aden -- that Moscow "will continue a policy of friendly cooperation" with South Yemen.

Prime Minister Haidar Abu Bakr Attas and Soviet Politburo member Igor Ligachev met yesterday in a "warm, comradely" atmosphere, according to a report issued tonight by the Soviet news agency Tass.

Attas, described as a free floater in South Yemeni politics, is reported to have told diplomats here on Wednesday that he was backing former president Abdul Fatah Ismail and to have described President Ali Nasser Mohammed, reported by the radio broadcast to have been ousted, as a fascist and a dictator.

It was still unclear, however, whether Mohammed has been defeated, and Arab diplomatic sources in the region were skeptical of the radio broadcast proclaiming his ouster, according to news agencies.

In Paris, the head of a visiting Soviet parliamentary delegation said that rebel forces appeared to have gained the upper hand in South Yemen. He indicated that the Kremlin was ready to cooperate with the "new leaders," Washington Post correspondent Michael Dobbs reported.

Asked at a press luncheon in Paris about the fighting in South Yemen, the Soviet official, Lev Tolkunov, said that the group around Vice President Ali Ahmed Nasser Antar "appeared to be winning."

"We will examine the political line of the new leaders, if they succeed in consolidating their control," the Soviet official added. "If their line is in conformity with our agreement with South Yemen, it goes without saying that we will also conform to the terms of the agreement and will develop the cooperation foreseen by this agreement."

In the absence of credible reports from the battle front, the Soviet statements provided the clearest indication yet that Moscow is prepared to accept a change in the leadership of the only Marxist state in the Arab world.

The Soviet Union and South Yemen signed a 20-year treaty of friendship in October 1979. The former British colony, officially the People's Democratic Republic of Yemen, quickly established itself as a Marxist state after independence in 1967.

Ligachev, the second-ranking member of the Soviet Communist Party, first met with Attas and other South Yemeni officials last Friday, a day after they arrived here from New Delhi and four days after fighting broke out in Aden.

In official statements and in news reports, the Soviet Union has taken a cautious approach to the South Yemen conflict, issuing appeals for an end to the "internecine" fighting and cautioning against outside interference.

Attas' meetings with Ligachev underscored Moscow's concern about the siutation in South Yemen. The Soviet Union apparently was caught off guard by the violence and is anxious that the instability not lead to the loss of a strategically placed ally.

Some western diplomats here speculated that while Moscow clearly backed the return from exile of Ismail to South Yemen last year, the Soviets probably did not anticipate the developments of the past two weeks.

However, once the fighting in Aden continued unabated, Attas' appearance here last week was seen as a precautionary move by Moscow to preserve its options and to avoid having to choose between Ismail and Mohammed. One view is that the Kremlin would like to see South Yemeni politics move away from tribal and personal loyalties toward a more broadly based coalition.

Whatever the role of Moscow, most diplomats here see the South Yemen crisis as costing the Soviet Union a loss of prestige in the region. The failure of Soviet mediating efforts, the violence and the forced evacuation of Soviet personnel could only be seen as an embarrassment and a setback to Soviet efforts to broaden its influence among the conservative Persian Gulf states, diplomats noted.

In today's Tass report, both the South Yemenis and the Soviets said the "priority tasks" were to end the fighting, normalize life in the country and provide emergency aid to the people.

Dobbs also reported from Paris:

The French and Italian ambassadors to South Yemen, evacuated yesterday, provided a graphic description of the fighting in Aden. Estimating the death toll at 10,000, the diplomats said that corpses were piled up in the streets of the capital, along with the burned-out wreckage of at least 100 tanks.

"In 10 days, the South Yemenis have destroyed what it took them 10 years to build," commented the Italian ambassador, Michele Petrocelli, to journalists aboard the French frigate De Grasse.

The French ambassador, Pierre Audebert, who served in Lebanon at the height of its civil war, said the fighting had been "much more ferocious" in Aden than it was in Beirut.

"In Aden, we witnessed real tank battles," the ambassador said. "This isn't a coup d'etat. It isn't yet a civil war. It is a clan, tribal war -- but one that is being fought in the town with heavy arms, planes at first, and later tanks, artillery, mortars and rockets."

According to an Associated Press dispatch from Bahrain, citing Arab diplomatic sources, as many as 40,000 regular and irregular troops loyal to President Mohammed have begun a counteroffensive against the rebels. The report said that the rebel forces appeared in control of the strategic suburb of Khormaksar on the Aden waterfront, which includes the airport, embassies and administration building.

According to the French ambassador, Soviet and Palestinian representatives in Aden played an important role in arranging the evacuation of foreign nationals from South Yemen earlier this week. The Soviet Embassy was the site of talks involving a "committee of four," made up of two supporters of President Mohammed and two supporters of Ismail.

The diplomats said that scarcely a single building in Aden remained intact. The Soviet, French, and Italian embassies have been devastated, along with the main hotels, official buildings and the airport. The appalling sanitary conditions have created fears of disease.

"There isn't any water in the town. People are drinking filthy water in which decomposing corpses have been stagnating," said Pierre Hugues, counselor of the French embassy.