The four major West European Communist parties, which have been on the outs with the Soviet Union in varying degrees in recent times, have all lined up with Moscow behind Vietnam.

The Communist parties of Italy, France, Spain and Portugal all accused China of aggression against Vietnam.

Italian Communist leader Enrico Berlinguer was the only one, however, to mix his denunciation with kind words for China. The Italian Communists have been trying for several years, without notable success, to reestablish good relations with the Chinese party.

The French Communist Party newspaper L'Humanite spoke of "premeditated aggression" by China and said it was no accident that it came immediately after the U.S. visit of Teng Hsiao-ping.

"It is legitimate to think," said the French party organ, "that [Washington] secretly gave its encouragement."

The French party currently has the worst relations with Moscow of any of the so-called "Eurocommunist" parties. But it has also been the most rigid in its approach to its own domestic politics.

The Soviets have been making increasing efforts in recent months to reconcile their differences with the Western European Communists. There have been increasing contacts between the Soviets and the Spanish Communists, once the most outspokenly anti-Soviet of the Western Communist parties.

The Bulgarian Communist Party, the most faithful to Moscow of any of the East European parties, has served on several occasions as the intermediary to carry on the dialogue between Soviet and Western parties.

There has been speculation for some time that the Soviets wanted to mend their fences in Western Europe generally, not just with the region's important Communist parties, so that they could turn their attention to their deteriorating relations with China without fear of a "second front" in Europe.

The Soviets have succeeded in improving the atmosphere of their relations with France and West Germany, both of which have been expressing reservations about what they regard as U.S. use of improved relations with China as an anti-Soviet club.

The Italian and Spanish Communists have toned down their anti-Soviet attacks in recent months. Even the French -- who went so far this fall as to publish, with major official publicity, an anti-Soviet book by a panel of Communist intellectuals -- have pulled back. The French party's anti-Sovietism was widely seen as an attempt to divert the growing volume of internal party dissent against the leadership's role in sabotaging the victory of the French left in the general elections last spring.

Spanish Communist leader Santiago Carrillo accused China of "hegemony." the word the Chinese ordinarily use to denounce Soviet policy. He recalled that the Spanish party had also denounced the Soviet invasion of Czechoslovakia and the Vietnamese invasion of Cambodia.

"We condemn the invasion of one socialist country by another socialist country," Carrillo said.

The Portuguese Communist Party sent a telegram to Hanoi expressing solidarity and denouncing the "hideous crime that confirms the profoundly reactionary character of the leaders of Peking."

Italian leader Berlinguer strayed from a prepared speech text in Leghorn yesterday to say that the Sino-Vietnamese conflict "deeply troubles all peace-lovers and provokes a special emotion among Communists."

The Chinese attack, he said, raises "new and disquieting questions about the general orientation of Chinese policy."

He noted that the Italian party had always supported China's "just demands for the place it deserves in the world." The Italians, he said, have always rejected "anathemas, excommunications and summary judgments," but the Italian party disapproves the Chinese attack, for "no one can believe that Vietnam wanted to attack China."

Italian party sources said that Berlinguer's speech was seen in party circles as a signal that the Italian Communists still want to pursue the search for better ties. The Italians say they have been somewhat encouraged because the official at the Chinese foreign ministry who was responsible for China's policy of encouraging Maoist splinter parties as a weapon against the regular Communist party organizations in Western Europe has recently lost his job.

There have been no official contacts between the Italian and Chinese Communists since 1965. Ironically, Italian party leaders say they had tried to use the Vietnamese party as a channel to improve relations with Peking. More recently, however, the Italians seem to have been using the Yugoslavs as the main conduit, with no better results than before.