A coalition on the left that came together unexpectedly ahead of France's snap elections won the most parliamentary seats in the vote, according to polling projections.

The surprise projections just after the polls closed and put President Emmanuel Macron's centrist alliance in second place and the far right in third.

The lack of majority for any single alliance plunged France into political and economic turmoil. Final results are not expected until late tonight or early on Monday in the highly volatile snap election, which was called just four weeks ago in a huge gamble for Mr Macron.

The deeply unpopular president lost control of parliament, according to the projections. Marine Le Pen's far right drastically increased the number of seats it holds in parliament but fell far short of expectations.

The snap legislative elections in this nuclear-armed nation and major economy will influence the war in Ukraine, global diplomacy and Europe's economic stability.

France now faces the prospect of weeks of political machinations to determine who will be prime minister and lead the National Assembly. And Mr Macron faces the prospect of leading the country alongside a prime minister opposed to most of his domestic policies.

French leftist leader Jean-Luc Melenchon called the projections an "immense relief for a majority of people in our country" and he demanded the resignation of the prime minister.

Mr Melenchon is the most prominent of the leftist leaders who unexpectedly came together ahead of the two-round elections.

The projections, if confirmed by official counts expected later on Sunday or early on Monday, plunge a pillar of the European Union and its second-largest economy into intense uncertainty, with no clarity about who might partner with Mr Macron as prime minister in governing France.

The timing of France's leap into the political unknown could hardly be worse: With the Paris Olympics opening in less than three weeks, the country will be grappling with domestic instability when the eyes of the world are upon it.

For 46-year-old Mr Macron's centrists, the legislative elections have turned into a fiasco. He stunned France, and many in his own government, by dissolving parliament's lower house, the National Assembly, after the far right surged in French voting for the European elections.

Mr Macron argued that sending voters back to the ballot boxes would provide France with "clarification".

The president was gambling that with France's fate in their hands, voters might shift from the far right and left and return to mainstream parties closer to the centre - where Mr Macron found much of the support that won him the presidency in 2017 and again in 2022. That, he hoped, would fortify his presidency for his remaining three years in office.

But rather than rally behind him, millions of voters on both the left and right of France's increasingly polarised political landscape seized on his surprise decision as an opportunity to vent their anger and possibly sideline Mr Macron, by saddling him with a parliament that could now largely be filled with politicians hostile both to him and, in particular, his pro-business policies.

Already in last weekend's first round of balloting, voters massively backed candidates from the far-right National Rally, in even greater numbers than in voting for the European Parliament. A coalition on of parties on the left took second and his centrist alliance was a distant third.

A hung parliament with no single bloc coming close to getting the 289 seats needed for an absolute majority in the National Assembly, the more powerful of France's two legislative chambers, would be unknown territory for modern France and usher in political turmoil.

Unlike other countries in Europe that are more accustomed to coalition governments, France does not have a tradition of politicians from rival political camps coming together to form a working majority.

The sharp polarisation of French politics is sure to complicate any coalition-building effort. Racism and antisemitism marred the electoral campaign, along with Russian disinformation campaigns, and more than 50 candidates reported being physically attacked - highly unusual for France. The government said it deployed 30,000 police for Sunday's runoff vote - an indication of both the high stakes and concerns that a far-right victory, or even no clear win for any bloc, could trigger protests.

Any cobbled-together majority risks being fragile, vulnerable to no-confidence votes that could cause it to fall.

Prolonged instability could increase suggestions from his opponents that Mr Macron should cut short his second and last term. The French Constitution prevents him from dissolving parliament again in the next 12 months, barring that as a route to possibly give France greater clarity.