President Emmanuel Macron has avoided his nightmare scenario of the far right coming to power in France but still faces an unprecedented challenge steering his country and the remainder of his presidency through an uncertain future.
Macron's centrist forces performed more strongly than expected in the legislative elections, projected to come in second behind the resurgent left, with the far right that won the first round on June 30 in only third place.
Yet as he prepares to fly to the United States for a NATO summit in Washington, he now faces a number of headaches including a left that now believes it has a mandate to govern, his own unpopularity, and open dissent among some of his most influential allies.
There is still palpable anger among Macron's allies over his decision to call snap legislative elections three years ahead of time after his party was trounced in EU Parliament elections last month.
The president argued that a "clarification" was needed in French politics.
"The decision to dissolve the National Assembly, which was supposed to be a moment of clarification, has instead led to uncertainty," his former Prime Minister Edouard Philippe said Sunday in an unusually sharp barb.
Prime Minister Gabriel Attal, who said he would offer his resignation Monday but was also prepared to stay on, said in an extraordinary show of dissent after the election that he "did not choose this dissolution".
The government's strategy of employing a so-called Republican Front for the centre and left to team up to block the far right appears to have worked.
But the election will mark a turning point in Macron's presidency with three years of his term still to run until 2027, with the very mixed new parliament inevitably becoming a far more important actor.
Macron appeared in no hurry on this occasion to make a rapid and theatrical decision, with an aide briefing media that the president preferred to analyse the full results before jumping to conclusions.
The president is confident "and is not going for a small majority", the aide said. "The question now is who is going to govern and have a majority."
Philippe raised the prospect of a broad coalition that would take in parties from right to left via the centre, but exclude the far-right National Rally (RN) and the hard-left France Unbowed (LFI).
So far the leftist New Popular Front (NFP) has not fractured even if the LFI's firebrand figurehead Jean-Luc Melenchon is a constant source of tension.
Foreign Minister Stephane Sejourne, who leads Macron's party, ruled out that Melenchon "and a certain number of his allies" would govern France.
But Laurent Wauquiez, a senior figure among traditional right-wing lawmakers, who won his seat, appeared to rule out entering into any coalition with Macron.
Macron's own popularity has hit such a low that he stayed totally out of the final week of the election campaign, not making a single comment in public as the vastly more popular Attal took the lead.
After voting Sunday he mingled with well-wishers in Le Touquet, but did not repeat his walk through the fashionable Channel resort in a bomber jacket and baseball cap as he did in the June 30 first round, seen as arrogant by some supporters.
Political manoeuvring will intensify beneath him. Interior Minister Gerald Darmanin, who won his seat, has made it clear he plans to be a leading voice in the new parliament, possibly in alliance with the faction of Philippe.
And while the far right was defeated in these elections, its three-time presidential candidate Marine Le Pen said she believed this would have no impact on her ambition to win the Elysee Palace in 2027.
"The tide is rising. It did not rise high enough this time, but it continues to rise and, consequently, our victory has only been delayed," Le Pen said.