Less than two months after he was re-elected president, Emmanuel Macron is on course to lose control of the French National Assembly following a strong performance by rival parties.
His centrist Ensemble coalition has won Sunday’s parliamentary elections.
But he is set to lose dozens of seats and will struggle to pass reforms.
A newly formed alliance of left, far-left and green parties has come second, with Marine Le Pen’s far-right party in third.
President Macron now faces the prospect of losing some of his cabinet ministers and having to work with a fragmented National Assembly that is far less pliant.
A storm hit Paris as the prime minister he had only recently appointed, Elisabeth Borne, returned from the presidential Élysée palace to her Matignon residence. Appearing on French TV minutes later, she said the situation was unprecedented and modern France had never seen a National Assembly like this one.
“This situation represents a risk for our country, given the risks we’re facing nationally and internationally,” she said.
“We will work as of tomorrow to build a working majority.”
Far-left leader Jean-Luc Mélenchon was enjoying his success in bringing mainstream parties into his broad-based alliance. He told supporters that the presidential party had suffered a total rout and every possibility was now in their hands.
Ms Le Pen was also in jubilant mood. The people had spoken, she said: Emmanuel’s Macron’s adventure was over and he had been consigned to a minority government.
The right-wing Republicans were happy, too, because their numbers had not fallen back as far as feared. Party chairman Christian Jacob said it was a “stinging failure” for a president now paying for cynically weaponising France’s extremes.
If the prime minister had been looking to the Republicans to help build a working majority, Mr Jacob’s message was not immediately encouraging.
ANALYSIS: Macron chastened and weakened by poll setback
Emmanuel Macron had more than 300 seats in the outgoing parliament and defeated Ms Le Pen’s National Rally convincingly in the presidential election in April. To maintain his outright majority he needed 289 seats, but Sunday’s projection of around 235 to 240 seats is worse than the pollsters expected.
Mr Mélenchon’s Nupes alliance is set to win 157 to 163 seats, while the far-right National Rally is on course to go from eight seats to between 85 and 90, says TF1 TV.
A separate projection for France Télévisions gave a more concrete result.
Among the ministers to lose their seats was Health Minister Brigitte Bourguignon, who lost to her far-right opponent by just 56 votes. Green Transition Minister Amélie de Montchalin was also defeated, but another key figure, Europe Minister Clément Beaune, survived despite losing in the first round.
One of Mr Macron’s closest allies, the president of the Assembly Richard Ferrand, conceded victory to his Nupes rival Mélanie Thomin, wishing her success.
An earlier casualty for the government came on the Caribbean island of Guadeloupe, where a secretary of state, Justine Benin, lost her seat and will have to resign.
In a rousing speech to his supporters, Mr Mélenchon said the result marked the moral failure of “Macronie”, accusing the ruling party of enabling the far right by refusing to give clear guidance in seats where the left was running head to head with Marine Le Pen’s party.
In a tacit admission that he was unlikely to achieve his ambition of prime minister, the far-left leader said he was now changing his role in battle: “But my commitment is and will remain at the front of your ranks until my final breath if you want.” As he was not running for a seat, he will not feature in the National Assembly.
Five years ago, Emmanuel Macron harnessed a wave of optimism, bringing in a fresh cohort of MPs from civil society. The new faces this time have emerged from Nupes and the National Rally.
Among the MPs elected for Nupes, which stands for New Ecological and Social Popular Union, is a hotel chambermaid who led her colleagues in a fight for better pay and conditions. Rachel Keke had vowed to dance in the Assembly if she succeeded in defeating a former sports minister.
What have they promised?
President Macron offered a “new method” of governing with greater involvement from civil society, proposing:
A National Council for Refoundation made up of local people to make France more democratic
Reforms to tackle the high cost of living and action towards full employment and carbon neutrality
Pension reforms and gradually raising the retirement age to 65
The left-green alliance wants:
Retirement lowered from 62 to 60
Minimum wages (known as Smic) to go up by about 15% to €1,500 a month
A freeze on the prices of basic essentials and the creation of a million jobs.