PRESIDENT Francois Mitterrand and his Socialist Party suffered a defeat in France's election -- but the parties of the right fell short of the commanding victory for which they had hoped. They are not quite in a position to force Mr. Mitterrand's hand. Now the election campaign will continue, in effect, in the newly elected National Assembly.

The right has ended the Socialists' control of the National Assembly, but the alliance that holds the right together is full of ambiguities. Each of the two major parties of the right has its own candidate for premier -- respectively, the mayor of Paris, Jacques Chirac, and former president Valery Giscard d'Estaing. Mr. Mitterrand retains formidable constitutional powers, the most immediately important of which is the power to choose the premier. Political reality, as well as the law, seems to leave Mr. Mitterrand with a good deal of latitude to pick among a number of prominent politicians of the center-right and to take advantage of the rivalries among them.

The five years of Socialist rule now ended have left the French political system stronger and better balanced than ever before in the Fifth Republic. The Socialists have destroyed the assumption, prevalent in France for most of the past generation, that only the conservatives could rule competently, with adequate concern for national security and economic strength. They have established a precedent for alternation in power that can only be healthy. Similarly, the responsibilities of actually running the government have divested the Socialists of many of the ideological illusions that handicapped them in the past.

The Communists continue their slide toward a purely marginal role. In this election they got less than 10 percent of the vote; the Socialists got 33 percent. The emergence over the past dozen years of a strong noncommunist French left, not subservient to the Soviets, has been a change of the first importance in European politics. On the opposite fringe, the rise in the strength of the xenophobic and racist National Front is distressing. But there have been similar movements in France in the past, and none of them has come to much.

This election isn't likely to bring any great change to France's relations with its friends and allies. The differences between right and left in foreign policy are matters of nuance, not principle. The greatest concern abroad is the possibility of a stalemate between the Socialist president and a parliament dominated by conservatives. But both sides will have to be careful there. An immobilized government would not be popular in France, and the next election is close. France is to elect a president in 1988, and that is the event toward which everything in French politics will now be pointed.