Just two months after being re-elected for a second term, French President Emmanuel Macron saw his hopes of pushing through his domestic agenda take a humbling blow yesterday. What comes next?
His allies, known together as "Ensemble" (Together), were finishing as the biggest party in parliament with 234 MPs so far according to a 97% vote count, but far short of the 289 needed for a majority.
This scenario is extremely rare under modern France's presidential regime, even before a constitutional change in 2002 which was intended to make it easier for the head of state to secure a parliamentary majority.
The election will not affect French foreign policy in theory, which is the exclusive domain of the president, but Macron's domestic worries are likely to be a constant distraction and could undermine him abroad.
Here are the possible scenarios:
Form an alliance
Work on this will begins this morning, Prime Minister Elisabeth Borne vowed in a short speech on last night.
In the middle of the biggest cost-of-living crisis in a generation, the ruling party was in a rush to pass an emergency bill to help low-income families before the summer holidays in August.
That, along with other key parts of Mr Macron's manifesto - such as welfare reform or raising the retirement age - will require the support of allies in the National Assembly.
"Together" is seen as most likely to reach out to France's traditional right-wing party, the Republicans (LR), which have so far won 61 seats, and its centre-right ally UDI.
"We are going to form a majority very quickly," said Olivier Veran, minister in charge of parliamentary relations, sounding an optimistic note.
Economy Minister Bruno Le Maire said that the ruling party would need "a lot of imagination" and he called on parties which shared Mr Macron's "clear ideas" to support him.
Although some inside LR are known to be in favour of working with Mr Macron, including former president Nicolas Sarkozy, party head Christian Jacob ruled it out.
"As far as we are concerned, we campaigned as an opposition party, we are in the opposition and we will stay in opposition," he said.
But is this a negotiating tactic, perhaps to attract offers of ministerial posts and other concessions?
If an alliance were formed, Mr Macron would have to shift rightwards, but might be able to push through his cherished tax cuts, welfare and pension reform.
In the absence of a formal alliance, the minority government will need to rely on support from opposition parties for each piece of legislation.
This will require long negotiations before each bill is brought to a vote - and leaves the government vulnerable to last-minute withdrawals that could lead to defeat.
Again, the Republicans will be key, given that support from the hard-left NUPES alliance or the far-right National Rally will be ruled out.
"You can govern with a minority so long as the opposition parties do not join forces against you," said Dominique Rousseau, a constitutional law expert at the Paris Pantheon-Sorbonne Universit.
Socialist Prime Minister Michel Rocard headed a minority left-wing government from 1988-1991 after gains by the right in parliamentary elections in 1988.
"It was hell," his cabinet director Jean-Paul Huchon was quoted as saying in Le Point magazine recently.
Ms Borne is expected to go before the new parliament in the coming weeks to give her first speech and will face a highly uncertain confidence vote which could bring her down.
Even if the low-key career civil servant passes that test, she will be constantly vulnerable to a censureship motion that will bring down the government.
To pass legislation, the French constitution does give Mr Macron a tool to force through bills, article 49.3 of the constitution.
This enables the prime minister to ram legislation through without any parliamentary debate, but it can also be overturned if a majority opposes it within 24 hours of its use and can only be used once every parliamentary session.
"Ungovernable" said the headline of a column in Les Echos newspaper.
As a final resort, if the parliament remains deadlocked and no stable government can be formed, Mr Macron has one other option: dissolving the assembly and calling new elections.
But the outcome of this would be highly uncertain, with anger growing about inflation and support increasing for anti-establishment parties such as Mr Melenchon's France Unbowed and Marine Le Pen's National Rally.
Much would depend on whom voters blamed for the deadlock.