After nine years of Communist rule in Italy's capital, Rome's City Council elected a Christian Democratic mayor last night.

During the past year, the Communists have lost control over municipal governments in Florence, Naples and Turin, all of which had had Communist mayors for almost a decade, and longstanding Communist-Socialist administrations in Milan and Venice also are on the point of being replaced. The only major Italian city still under Communist control is Bologna, a traditional party stronghold.

The Communists' loss of control over the capital, prior to 1976 a Christian Democratic stronghold, can be traced directly to last May's municipal elections, during which the Marxist party lost its first-place status to the Christian Democrats. The city's voters, dissatisfied with the Communist-dominated left-wing administration, cut the party's share of the vote to 30.7 percent from 36 percent in 1981, while the Christian Democrats polled 33.2 percent.

But the changeover in administration also reflected a general shift in Italian politics that has seen the Socialist Party move away from leftist alliances to play a key role in centrist coalitions.

The new mayor, Nicola Signorello, a longtime Christian Democratic member of Parliament and a minister in four Cabinets, was elected with votes from representatives of the five parties -- Christian Democrats, Socialists, Republicans, Liberals and Social Democrats -- that make up the national coalition government headed by Socialist Prime Minister Bettino Craxi.

The same process has meant an end to the leftist governing alliances established in many other Italian cities following an unprecedented Communist sweep in the elections of 1975 and 1976. Local governments had become the major source of influence for the Communists, who, although Italy's second largest party, have been excluded from national governments here since 1947.