Addressing a massive crowd just four days before elections that could give Greek Communists a taste of power for the first time in 40 years, the leader of the pro-Moscow party predicted tonight that he would emerge as a kingmaker in Greece.

With downtown Constitution Square a sea of red flags, Harilaos Florakis hammered away at themes he hopes will deprive both the ruling Socialists and their conservative New Democracy rivals of a majority in the 300-seat parliament.

He predicted an "overwhelming" majority for the Communists and the ruling Pan-Hellenic Socialist Movement (Pasok) in elections Sunday, or, as he put it, the parties that supported the controversial election of President Christos Sartzetakis earlier this spring. The Communists assume that Pasok will come in first but that it will require Communist support to form a new government.

John C. Loulis, a conservative Greek political analyst, has said that a coalition between Pasok and the Communists "raised a potential danger to the balance of power in the Mediterranean" because it would put the parties of the left in a position to dictate Greek foreign policy, isolating Turkey and disrupting the North Atlantic Treaty Organization's lines of communication.

Even without Communist participation in a new government, if the pro-Moscow party and the smaller Euro-Communists can capture 15 percent of the vote they will be in a commanding position to dictate terms in a hung Parliament, ranking western diplomats and Greek political analysts say.

Barring surprises from undecided voters, the two Communist parties could do that well, as they did in the 1984 elections for the Parliament of the European Community. The pro-Moscow party polled 11.6 percent and the Euro-Communists 3.4 percent.

As he has since the campaign began on May 11, Florakis lashed out tonight against both his potential partners in a governing majority and their foes to the right, obviously trying to chip away votes in any direction. He labeled a new electoral law passed by Pasok and New Democracy legislators a "conspiracy" hatched by "highway robbers" because it favors the big parties at the expense of the smaller ones.

Communists say that with a straight proportional representation system they would have been entitled to 36 seats on the basis of the European elections, as against the 13 they had to settle for during the last general elections in 1981.

Demonstrating the fire that sustained him for 17 years in prison after service in the resistance during World War II and in the 1946-1949 Greek Civil War, Florakis, 71, sharply attacked Socialist Prime Minister Andreas Papandreou for allowing the right to come back from its 1981 defeat, when New Democracy won 35 percent of the vote.

The bitterness of Florakis' anti-Socialist remarks reflected Papandreou's scare tactics designed to win over Communist voters by warning that a victorious right would prosecute all leftists, adopt police-state tactics and reopen concentration camps.

Florakis said Greeks wanted a government of "genuine change" -- not Pasok's timid version, which had abandoned its 1981 election promises to leave the European Community and membership in the Atlantic Alliance and remove U.S. military bases. Both major parties have studiously avoided foreign policy issues in the current campaign, unlike in 1981, when Papandreou campaigned stridently against the United States, NATO and the European Community.

As the price for his party's help, Florakis has demanded a "common program" with Pasok and announced his willingness to negotiate a "reasonable" timetable on these issues, although Communist officials have said they would not press for representation in the Cabinet.

Papandreou, asked last week about such Communist support in case of a hung Parliament, said it would not be "healthy to give such a minority party a regulatory function." Pasok officials said privately that Papandreou might accept such a Communist-supported government for a few months before calling new elections in the hope of winning a mandate for his own party.