Yugoslavia, the first Communist country to break away from the Soviet bloc, has launched a spirited defense of the newest heretic - Spanish Communist Party leader Santiago Carrillo.

Yugoslav party theoreticians and the semi-official press have joined in criticizing the Soviet Union for trying to reimpose its authority over individual Communist parties. The polemics between Moscow and Madrid have been likened to the verbal exchanges at the time of President Tito's expulsion from the Commform, the international Communist organization, in 1948.

The influential Yugoslav weekly magazine Nin, for example, commented that whil the methods used to attack Carrillo may be new, the specific accusations are similar to those made against Tito 30 years ago.

Other Eastern European countries have also been taking sides in the dispute, which was sparked by Carrillo's book, "Eurocommunism and the State." In it, Carrillo rejects the idea of unconditional loyalty to the Soviet Union and traces the roots of Euro-communism back to Tito's defiance of Josef Stalin.

The ensuing furor has seen the hard-line parties of Czechosiovakia. East Germany and Bulgaria line up behind the Kremlin and launch stinging attacks on Carrillo. A hardline Czecholslovak leader, Vasil Bilak, peppered his denunciations of the Eurocommunists with words like "opportunist," "anti-Communist," "traitorous," and "anti-Soviet."

Meanwhile, the Hungarian leadership, which is attempting to assert gradually some measure of independence from the Soviet Union, has cautiously supported the right of each party to choose its own path. Poland has yet to commit itself.

Perhaps the strongest defense of Eurocommunism has come from Romania, which, although it remains a member of the Warsaw Pact, has been following independent foreign policies for the last 12 years.

An editorial in the official Romanian party newspaper Scinteia applauded the "unquestionable successes" of the European Communist parties and attributed them to the parties" respect for the vital interests and specific conditions of their own countries.

In an apparent reference to the attacks on Carrillo, the paper said it was wrong to fan disputes, apportion blame, and sharpen differences in the Communist movement.

"There is no unique prescription, no compulsory model, for carrying out revolutionary processes," Scinteia said.

Romanian and Yugoslav leaders interpret the attacks on Eurocommunism as an attempt to revise the results of last year's Berlin conference of European Communist parties. The conference, which was held on the anniversary of Tito's break with Moscow, was widely interpreted as a victory for the independents.

Yugoslav commentators have been recalling that the Soviet leader, Leonid Brezhnev, declared in Berlin that the controversial phrase "proletarian internationalism" should be taken to mean "voluntary cooperation among fraternal parties with respect for the equality and independence of each of them." Previously it had been used to justify subservience to Moscow.

The Yugoslav party's official journal Komunist commented this week that some Communist parties are trying to go back on this principle and are resisting the non-interference concept that they accepted in Berlin.

While Yugoslav leaders have supported the independent stand of the Western European Communist parties, they have emphasized that they do not favor establishment of a new center of world communism opposed to Moscow.

Despite their common resistance to Soviet domination, there are considerable differences between the type of communism preached by the opposition parties in Spain. France and Italy, and the type practiced by the ruling parties in Yugoslavia and Romania.