French political parties faced a daunting task to put together a government on Sunday after the second round of elections threw up a hung parliament, with a leftist alliance unexpectedly taking the top spot ahead of the far-right.
The results, based on pollsters' projections, were a setback for Marine Le Pen's nationalist, eurosceptic National Rally (RN), which opinion polls had predicted would be the largest party, but which placed only third.
They were also a blow for centrist president Emmanuel Macron, who called the ballot after his ticket was trounced in a European Parliament election last month.
The election will leave parliament divided in three big groups - the left, centrists, and the far-right, with hugely different platforms and no tradition at all of working together.
What comes next is uncertain.
The left, which wants to cap prices of essential goods like fuel and food, raise the minimum wage to a net €1,600 per month, hike wages for public sector workers and impose a wealth tax, immediately said it wanted to govern.
"The will of the people must be strictly respected ... the president must invite the New Popular Front to govern," said hard-left leader Jean-Luc Melenchon.
But the awkward New Popular Front (NFP) alliance, hastily put together before the vote, is far from an absolute majority.
The euro fell on Sunday after the vote projections were announced.
"There's really going to be a vacuum when it comes to France's legislative ability," said Simon Harvey, head of FX analysis at Monex Europe.
A key question is whether the leftist alliance, which gathers the hard left, Greens and Socialists will stay united and agree on what course to take.
The constitution does not oblige Mr Macron to ask the group to form a government, though that would be the usual step as it is the biggest group in parliament.
Leftist alliance
Mr Melenchon, leader of the hard-left France Unbowed (LFI), ruled out a broad coalition of parties of different stripes and said Mr Macron had a duty to call on the leftist alliance to rule.
Mr Macron's centrist group "Together" looked set to come second, just ahead of the RN, according to the pollsters' projections based on early results.
The Ipsos polling agency forecast the RN would get 120-134 seats, and its allies 14-18, out of the 577 seats in parliament. Elabe pollsters projected the RN and allies would win 136-144.
That was a far cry from weeks during which opinion polls consistently projected the RN would win comfortably, before the left and centrist alliances cooperated by pulling scores of candidates from three-way races to build a unified anti-RN vote.
In his first reaction, RN leader Jordan Bardella called the cooperation between anti-RN forces, known as the "republican front" a "disgraceful alliance" that he said would paralyse France.
'Victory delayed'
Marine Le Pen, who will be the party's candidate for the 2027 presidential election, said Sunday's ballot, in which the RN made major gains compared with previous elections, had sown the seeds for the future.
"Our victory has been merely delayed," she said.
The leftist alliance, whose parties have long been at odds with each other, was forecast to win between 171 and 187 seats in the Ipsos poll. Elabe pollsters saw the leftist alliance with 182-193 seats.
Cries of joy and tears of relief broke out at its gathering in Paris when the voting projections were announced. At the Greens' headquarters activists screamed in joy, embracing each other.
"I'm relieved. As a French-Moroccan, a doctor, an ecologist activist, what the far right was proposing to do as a government was craziness," said 34-year-old Hafsah Hachad.
In Mr Macron's entourage, there was no indication of his next move.
"The question we're going to have to ask ourselves tonight and in the coming days is: which coalition is capable of reaching the 289 seats to govern?" one person close to him told Reuters.
Some in his alliance, including former prime minister Edouard Philippe, envisaged a broad cross-party alliance but said it could not include the far-left France Unbowed.
On the more moderate left, Raphael Glucksmann, from the Socialist Party, urged his alliance partners to act like "grown-ups".
"We're ahead, but we're in a divided parliament," he said. "We're going to have to talk, to discuss, to engage in dialogue."
Official results were trickling in, with the votes from most, if not all, constituencies likely to be in by the end of the day or the early hours of Monday.
Voters punish Macron
Voters have punished Mr Macron and his ruling alliance for a cost of living crisis and failing public services, as well as over immigration and security.
Ms Le Pen and her party tapped into those grievances, spreading their appeal way beyond their traditional strongholds along the Mediterranean coast and in the country's northern rust belt, but their gains compared with previous elections proved insufficient to win power.