The silencing of Soviet dissident Andrei Sakharov has deeply shaken Communists in both Eastern and Western Europe, sending a cold war chill through Moscow's Warsaw Pact allies and forcing Western Europe's Communists together again in at least temporary criticism of the Soviet Union.

After having ardently defended the Soviet invasion of Afghanistan, the French Communist Party turned against Moscow with a mild criticism of the detention and exile of the Soviet physicist and his wife, Washington Post correspondent Ronald Koven reported from Paris.

The French Communist organ L'Humanite said that French party leader Georges Marchais had told Soviet President Leonid Brezhnev during a visit to Moscow earlier this month that the French party opposes resorting to "administrative measures" against opponents as a substitute for "political struggle." Therefore, L'Humanite said, the measures against Sakharov can therefore only meet with "our disapproval."

Spain's Communist Party, which takes a line independent of Moscow, also joined in the growing condemnation of the Soviets by saying, "These arbitrary methods are a violation of human rights, and of democratic liberty." The party had also recently condemned the Soviet invasion of Afghanistan.

The French and Spanish attacks followed a stinging editorial against the Soviet move in the Italian Communist newspaper L'Unita and a British denunciation on Tuesday.

In Portugal, however, the pro-Moscow Communist Party was the only party in the parliament to vote against a motion condemning the Soviet action against Sakharov.

Meanwhile, Warsaw Pact officials offered a finely shaded range of reaction, but their underlying joint concern was that revival of the cold war seemed closer now than at any time in the last 10 years, Washington Post correspondent Dusko Doder reported from Belgrade. Western diplomats reported a mood of apprehension throughout the region, and authoritative Eastern European officials argued privately that it is impossible to have both detente and a cold war at the same time.

One source said Moscow's move was in response to President Carter's economic sanctions against the Soviet Union and threats to boycott the Moscow Summer Olympics because of the Soviet invasion of Afghanistan.

"It's a signal that they have given up on Carter completely," he said.

But such exchanges of signals, a Polish diplomat said, "will have an effect on countries caught in between."

Communist affairs analysts pointed out that Deputy Premier Vladimir Kirillin, who as chairman of the Soviet State Committee on Science and Technology was in charge of the entire Soviet scientific establishment, was relieved of his dutes at the same time.

Kirillin's ouster, these sources said, was probably linked to disagreements within the ruling elite over the Sakharov decision. Sakharov was the youngest person ever elected to the prestigious Academy of Sciences. He was 29 when together with physicist Igor Tamm he made the scientific breakthrough that led to the development of the Soviet hydrogen bomb in 1950. He was one of a handful of persons to have been awarded three Orders of the Hero of the Soviet Union.

The move against him at a time when Moscow is subjected to worldwide criticism over the Afghan invasion and when the fate of the summer Olympic Games now seems unclear was seen by authoritative sources as possibly reflecting a serious dispute among the Kremlin leaders.

A ranking Yugoslav official said his government was surprised by the move against Sakharov, whom he called a "great man." He said it was a part of what he termed an "incredible deterioration" in international affairs generated by the hostage crisis in Iran and the Soviet invasion of Afghanistan.

Other Yugoslav sources suggested that the move may have been designed to undermine the positions of Soviet leaders identified with the policy of detente and that it may be sponsored by hard-liners seeking a climate of increased ideological rigidity within the Soviet Bloc.

The Yugoslav press reported the Sakharov action in great detail while several Warsaw Pact countries carried only brief dispatches on the subject without comment.

Diplomats from the Soviet-bloc countries offered only private assessments of what they generally see as a more repressive climate in the Soviet Union in the past few months.

They said they fear a similar climate would be transferred to their countries, which eventually will have to fall in line with Moscow's policies.

"Life is going to be more difficult," one diplomat said ruefully.

While Warsaw Pact nations have responded to Soviet foreign policy moves with predictable backing, sources here say they have information that Poland and Hungary had grave reservations about the Afghan invasion. Romania was conveniently absent during the U.N. vote on Afghanistan, but its president, Nicolae Ceausescu, is also known to have privately criticized the action.

Since foreign tensions are invariably linked to domestic policies in communist countries, there are fears that the move against Sakharov and continued tensions over Afghanistan may be followed by pressures on East European governments to reverse their domestic policies and adopt a tougher domestic political line in the coming months.

The about-face by the French Communist Party was particularly striking since earlier this week, Marchais, the party leader, had publicly endorsed the Brezhnev doctrine giving the Soviet Union the right to intervene militarily to preserve communist governments, as in Czechoslovakia in 1968.

Marchais was asked in a French television interview about his talks with Brezhnev whether "peaceful coexistence is not the right of capitalist countries to be defeated." He replied, "But of course . . . . You'd think you were making a discovery, my poor friend . . . . Peaceful coexistence means not using arms, but it is also the class struggle in all its forms."

The Soviet troops in Afghanistan were "peaceful forces," conducting a "totally legitimate intervention," Marchais said. The territorial status quo created by the East-West split at the Yalta conference of 1945 does not mean that countries should not be destabilized, he said.

The French Communist Party's hard-line position has been politically costly. The party's top intellectuals have been publicly protesting the leadership's stand. Jean Elleinstein, the most vocal French Communist dissident, said that he had been "tricked," presumably by Marchais, into thinking that it was still possible to work from inside.

Many younger intellectuals have quit the party recently and working-class militants have been expressing their disenchantment simply by not attending cell meetings, according to party insiders.

The sales of L'Humanite have fallen off so sharply that it is now being heavily outsold by Liberation, an unorthodox leftist daily that is turning increasingly anti-Soviet.

The French Communist stand has also hurt its relations with the Italian Communists, the largest party in Western Europe. Before going to Moscow for the first time in five years, Marchais called on Italian Communist leader Enrico Berlinguer in Rome, as if to indicate that the French party still adheres to the same "Eurocommunist" ideas as the Italians. But there was no agreement between the two organizations. The Italians underlined that point by issuing a particularly uncompromising condemnation of the Soviets during the Marchais-Berlinguer meeting.

At the European Parliament in Strasbourg Jan. 16, the Italian Communist members voted for a resolution condemning the Soviet intervention in Afghanistan, while the French Communists voted against it.

The idea that Eurocommunism is dead has become a cliche in Western Europe. Its official birth came at a Madrid meeting in March 1975 among Marchais, Berlinguer and Spanish Communist leader Santi.

While formally reaffirming their attachment to the word eurocommunism, the French Communists have done the most to empty it of practical political significance, starting with their break from the alliance with the Socialist Party that prevented a victory of the French left in the legislative elections of March 1978.

The French party hailed the recent electoral advances of the Portuguese Communists, the major West European party that has most consistently rejected Eurocommunism, as proof that a tough-minded strategy works.

It seems, however, to be gradually reducing both the fervor and numbers of the French party membership in contradiction with the leadership's stated goal of doubling the membership to a million card carriers.

The mild expression of disapproval of the measures against Sakharov seem unlikely to reverse the trend, especially since party dissidents condemned the Soviet action in far more vigorous terms.