Paris — French Prime Minister Gabriel Attal was set to resign but stay on as head of a caretaker government Tuesday, officials said, with no replacement in sight as divided parliamentary groups succumb to infighting.

President Emmanuel Macron is expected to accept Attal’s resignation after Tuesday’s Cabinet meeting — the first since his allies got roundly beaten in a snap National Assembly election called to “clarify” the political landscape.

But he was also likely to ask the prime minister and his team to stay on as a caretaker government with restricted powers until after the Paris Olympics, which open on July 26.

This would also give political parties more time to build a governing coalition after the July 7 election runoff left the National Assembly without an overall majority.

A broad alliance — called New Popular Front (NFP) — of Socialists, Communists, Greens and the hard-left France Unbowed (LFI) won the most seats, with 193 in the 577-strong lower chamber.

Macron’s allies came second with 164 seats and the far-right National Rally (RN) third at 143.

The divided NFP alliance has been scrambling to come up with a consensus candidate for prime minister.

But internal conflicts — notably between the LFI and the more moderate Socialists — have thwarted all efforts to find a personality able to survive a confidence vote in parliament.

‘Shameful’

Over the weekend, the Socialists torpedoed the hopes of Huguette Bello, 73, a former communist MP and the president of the regional council in France’s overseas territory La Reunion, who had support from the other left-wing parties.

The LFI, in turn, rejected Laurence Tubiana, an economist and climate specialist without political affiliation, who had the backing of the Socialists, Communists and Green party.

Leftist deputy Francois Ruffin on Tuesday called the NFP’s infighting “shameful,” while Green deputy Sandrine Rousseau said the disagreements made her “very angry.”

On Saturday, Attal was voted in as leader of his party’s National Assembly contingent, as he eyes his own future outside government, saying he would “contribute to the emergence of a majority concerning projects and ideas.”

Macron and Attal, observers say, are still hoping to find a right-of-center majority in parliament that would keep both the LFI or the far-right RN out of any new coalition.

Once Attal resigns, he and other cabinet members will be able to take their seats in parliament and participate in any coalition-building.

Parliament reconvenes on Thursday and will start by filling the National Assembly speaker job and other key positions.

Cracks have appeared between Attal and his former mentor Macron, whom the prime minister appears to blame for the electoral defeat only six months after being appointed France’s youngest ever head of government at 34.

Macron still has almost three years to go as president before elections in 2027, at which far-right leader Marine Le Pen is expected to make a fresh bid for power.