An unlikely five-year-old political marriage that was originally given little chance of lasting won France's leftist parties control over the majority of this country's 22 largest cities, final results of yesterday's first-round municipal elections showed today.

Winning their biggest share of power in local government since World War II, the Communist and Socialist parties captured 33 city halls in towns of more than 30,000 inhabitants and took 52 per cent of all votes cast in such municipalities.

The stock exchange read the results as a defeat for the moderate coalition that supports President Valery Giscard d'Estaing. The market fell 3 per cent on an average, with some important issues dropping 5 per cent as soon as the market opened. The franc held steady against other currencies.

While France's tightly centralized administrative system and the impact of local issues and personalities limit the immediate significance of the left's impressive gains, several points emerge clearly:

The victory appears to have cemented the Communists and Socialists, who have fought each other for the same clientele for years and have remained deeply suspicious of each other, into a solid unit ready to bid for national power in parilamentary elections to be held within the next year.

Giscard's prestige was also damaged by the success here is Paris of Gaullist leader Jacques Chirac, who outdistanced Giscard's chosen candidate, Industry Minister Michel d'Ornano, and appears likely to win in next Sunday's runoff.

Concern about nuclear power and about urban problems in Paris produced strong support for environmentalist candidates here and in Alsace, where at least six were elected to city councils. Their share of the Paris vote was 10 per cent, although it was only 2 per cent nationally.

About 80 per cent of the city council seats up for election in France's 36,395 municipalities were decided in yesterday's voting, in which there was a strong turnout of 78 per cent. Voters choose between party lists for the city councils, which then elect mayors from their ranks.

Those cities that did not give an absolute majority to any party, including Paris, Marseilles, Lyons, Nice, Lille and other large cities, will have runoff elections next Sunday.

The Interior Ministry issued statistics showing that the Socialists, Communists and the smaller Radicals of the Left Party, gained seven percentage points compared to the last municipal elections in 1971, when they ran separate lists of candidates.

The following year the three parties united on a "common program" calling for the nationalization of heavy industry and financial institutions and a radical redistribution of wealth here. The alliance, the brainchild of the militant Marxist wing of the Socialist Party, appeared to breathe new life into the Socialists.

They now claim they would win more than 30 per cent in a national election. Much of their progress has been made at the expense of the Communists, who saw their support drop below their traditional 20 per cent base line.

But the municipal election's first round indicated that the erosion of Communist support appears to have stopped and that the leftist alliance does not necessarily cost the Communists votes. The Communists held the 50 large city halls they controlled and added 10 more on the first round of voting to become the numerically dominant party in local government. Communist candidates given places on Socialist-dominated lists entered the councils of 19 large towns for the first time.

The Socialists held on to 31 city halls and picked up 23 new mayoralities. The left's gains were spread throughout the country.

In the Paris race, Chirac's lists of candidates finished in front of d'Ornano's lists in 11 of the 17 voting districts in which they dueled. The two men are to meet Tuesday, and d'Ornano indicated privately today that he will throw enough votes behind Chirac to insure his victory in Paris against the combined Socialist-Communist ticket next Sunday.

Despite Chirac's success in Paris, which makes him a clear rival of Giscard for national authority, the political machine that he is attempting to build out of the Gaullist party did not fare well in the provinces, where Gaullist mayors and city councilmen were the chief victims of the leftist surge.

The picture was reversed for Giscard's Republican Independents, who increased by a percentage point their standing in the provinces largely at the expense of non-Gaullist centrists that they absorded.

Among those winning a town council seat was Jacques Kosciusko-Morizet the French ambassador to the United States. Kosciusko-Morizet, who is expected to come home from Washington shortly, was elected on a ticket supporting Giscard in the Versailles region.

Political sources suggested that d'Ornano, who stepped down as mayor of Deauville to run for the Paris post is now under consideration for the Washington job after an expected Cabinet reshuffle later this year.