The political balance in Greece on the local government level was decisively reversed in runoff municipal elections yesterday in which mayoral candidates of the Socialist and Communist parties captured the overwhelming majority of Greek cities and towns, including Athens, Salonika, Piraeus and Patras.

In many cases the success of candidates associated with Prime Minister Andreas Papandreou's Panhellenic Socialist Movement (Pasok) was largely owed to Communist voters who supported the Socialist candidates in runoff races against representatives of the conservative New Democracy Party.

According to unofficial estimates, Communist support accounted for more than half the victories scored by Socialist-allied candidates nationwide. The consensus among analysts is that on the basis of the municipal election results the Moscow-line Communist Party has doubled the 11 percent of the votes it secured in last year's parliamentary election that brought Papandreou's party to power.

Observers here questioned to what extent being beholden to the Communists for his party's sweeping success will oblige Papandreou to modify his domestic or foreign policies to please Communist radicals.

But Papandreou in caustic statements yesterday attributed the Communist successes to an unholy alliance between the Communists and the conservatives, accusing New Democracy Party voters of backing Communists against Socialist candidates in order to deal a blow to Pasok.

The prime minister is already aware of possible Communist pressure through the trade unions, in which the party is strong. But in any case, Papandreou can still fall back on a secure parliamentary majority with which to implement his government program.

Pasok, the Communists and New Democracy had all claimed success after the first round of voting one week earlier. Results had been inconclusive in 140 of a total of 276 municipalities, including the large cities.

All Greek political forces similarly claimed victory after yesterday's second round of voting, in which the two leading candidates of the week before competed. However, the final count tends to support Papandreou's claim of a "sweeping victory for Pasok and the forces of change" -- the customary way of referring to the joint Socialist and Communist left.

Of a total of 276 mayoral posts nationwide, 173 were won by Socialist-backed candidates, 45 by candidates allied to the Communist Party and just 44 by candidates affiliated with the New Democracy Party. Fourteen posts went to independent candidates.

The results represent a transformation of the face of local government in Greece. After the previous municipal elections in 1978, the conservatives controlled 128 municipalities around the country. Pasok, at that time the major opposition party, had secured 72 municipalities.

The importance of the Communist vote, however, belied Papandreou's statement yesterday that "the map of Greece has become green" -- referring to the emblem of his party, a green rising sun.

Communist support, for example, tipped the balance in favor of Socialist candidates like Dimitrios Beis in Athens, Theocharis Manavis in Salonika and Ioannis Papaspyrou in Piraeus against their conservative opponents.

The Communist Party made impressive gains in many municipalities where its candidates were pitted against those supported by the Socialists, notably in Papandreou's home town of Patras, in northern Greece and in Khania on the island of Crete, a Socialist stronghold.

Observers agree that the municipal election results are unlikely to prompt any crisis of identity or conscience within the New Democracy Party. The conservatives have been heartened, despite the loss of a great number of a mayors nationwide, by a gain in percentage points in the major cities over last year's parliamentary election results.

The conservatives also argue that the New Democracy Party is holding well in the provinces, since a Socialist-Communist alliance was needed to defeat its candidates. This feeling of relative success is expected to reinforce the precarious position of hawkish party leader Evanghelos Averoff, who has faced increasing factionalism and opposition from more moderate elements in the conservative ranks over the past year.