Instead of waking up on Monday to a country dominated by the far right, France awoke to becoming Italy, a country where only painstaking parliamentary negotiation may eventually yield a viable coalition government.

France said no to Marine Le Pen’s anti-immigrant National Rally party in legislative elections, another demonstration of its deep-seated resistance to nationalist adventures. It voted a resurgent left into a first place that fell far short of giving the left power, and it shifted the political heart of the country from an all-powerful presidency to the Parliament.

With the Paris Olympics set to open in less than three weeks, and an August exodus to the beaches or mountains a sacred feature of French life, talks to form a government may stretch into the fall, when France will need a government to pass a budget. The election, which might have provoked an uprising, produced an impasse.

The New Popular Front, a resurgent if fractious left-wing alliance, came in first with about 180 seats in the National Assembly and immediately demanded that President Emmanuel Macron ask it to form a government, saying it would put forward its choice of prime minister in the next week.

This demand ignored several things. Under the Constitution, Mr. Macron chooses the prime minister. In the 577-seat National Assembly, the New Popular Front is some 100 seats short of having a workable majority. It was not the program of the left-wing alliance that won it all its seats, but a combination of that and a decision by centrists and the left to form a “Republican front” of unity against the National Rally in the second round of voting.