The Communist parties of France, Italy and Spain joined today in demanding a share in the political leadership of their contries and promosed formally to seek and exercise power only in Democratic ways.

A declaration and statements issued by the leaders of the three most important Communist parties in Western Europe constitute their clearest join commitment to building a third model of communism that would be far more liberal than the Marxist systems of the Soviet Union and China.

For the first time in public, Italy's Enrico Berlinguer, France's Georges Marchais and host Spanish leader Santiago Carrillo indicated that they agree on a definition of "Eurocommunism."

Berlinguer and Marchais joined in six hours of discussion with Carrillo, spread over two days, in an effort to strengthen the Spanish party's bid to win legal status and popular support here after being outlawed for 40 years.

Their failure to join Carrillo in condemning the Soviet Union and Eastern Europe on human rights and other issues may dim what was otherwise a public relations success for the Spanish party in staging the two-day summit.

Opening a two-hour press conference - the only public appearance of the three men that the government of the three men that the government of King Juan Carlos would allow - Carrillo beamed as he noted that "this meeting is being held under the protection of the Spanish authorities." The showed, he said, "how much has changed in Spain."

Small contingents of Spanish riot police were posted around the luxury hotel where the conference was held. The government has not moved to silence Carrillo since it arrested and then released him two months ago after he ended 38 years of exile by sneaking back into the country.

Juan Carlos has responded to the conference with subtle but calculated efforts to undercut Carrillo. The king announced tonight that he would meet this weekend with Romanian President Nicolai Ceaucescu, one of the more independent Communist rulers. The government also arranged to order the explusion of a Soviet trade official for alleged espionage today.

The conference demostrated discernible movement by the once-hardline Stalinist French Communist Party in aligning its positions with its more liberal Spanish and Italian counterparts.

Scorned by critics as "spaghetti communism" and described by sympathetic viewers as "Mediterranean Marxism" or "socialism with a human face," Eurocommunism has remained a largely theoretical concept even as it has cast a growing political shadow across Western Europe.

It has helped Berlinguer's party become the second largest in Italy, on the threshold of a formal role in the government.

The French Communists, part of a leftist coalition that could win national elections in 1978, have usually rejected the notion that an identifiable European alternative model of Marxism exists.

Referring indirectly to Leninist ideology of a vanguard seizing and wielding power alone, Marchais said that "a lot of water has flowed under the bridge since 1971. We think that the conditions exist today for using a democratic way to achieve a socialist society."

"Socialist democracy in our countries will not be of the same kind as social democracy in countries where it already exists. If all that is Eurocommunism, we are in agreement on its meaning," Marchais said.

The French leader stressed that the three parties were not trying "to build a regional center" of communism to replace "the internationalism from which we have just emerged" - a reference to the rejection of control of the Communist movement by Moscow.

The communique stressed gradual if thorough reform rather than revolution. It asserted that the "economic, political, social and moral crises" of their countries "demand the presence of the working class and its parties in the control of political life."

The declaration contained no references to the wave of dissident activity in the Soviet bloc. Spanish Communists said earlier that Carrillo would attempt to get condemnation of Soviet repression into the communique.

The different appraches of the three men toward the Soviet Union emerged at the press conference, where Carrillo said bluntly that "in the system" of the Soviet Union and Eastern Europe "what is lacking is democracy."

Marchais spoke only of "negative aspects" of the Soviet system. Berlinguer, praising the Soviet Union for "its great conquests in the social domain," said it did show "authoritarian traits and limitations of liberty."

The Soviets have sought to oust Carrillo from the leadership of his party for his savage attacks on them. Berlinguer and Marchais, who have not yet faced such challenges, continue to be far more circumspect about Moscow.

The conference appeared to be considered a success by a buoyant Carrillo to whom demostrating independence from Moscow and dedication to democracy are vital, and to Marchais, who used it as a platform to make a vigorous pitch home via television for votes in this month's important French municipal elections.

Berliguer, who was less enthusiastic, is reportedly under pressure from hardliners about some aspects of the Eurocommunist philosophy.