French Prime Minister Edouard Philippe has stepped down after heading President Emmanuel Macron's government for three years.
The president swiftly named centre-right mayor Jean Castex to lead a new team of ministers after a reshuffle.
Although Philippe was considered more popular than the president, the ruling party had poor local election results at the weekend.
President Macron promised a "new path" in an interview published on Friday.
Philippe met the president early in the morning and they agreed the government would resign.
A reshuffle has been expected for some time, and it is common practice for a French president to replace a prime minister during the five-year term in office known as the "quinquennat".
The Elysée palace said in a statement that Philippe had "today handed in the government's resignation to the president of the republic, who accepted it", adding that he would stay in place until a new government was appointed.
Hours after Philippe's resignation, it was announced that the Law Court of the Republic, which deals with claims of ministerial misconduct, would open an inquiry into the way his government handled the pandemic.
Along with the outgoing prime minister, those under investigation include Agnès Buzyn, who stepped down as health minister in February, and her successor Olivier Véran, senior public prosecutor François Molin said.
France has reported 202,673 confirmed cases of Covid-19 and 29,875 deaths.
Who is Jean Castex?
Castex, 55, is little known in France, but he is a senior civil servant and has played a key role in the government's response to the Covid-19 pandemic.
He has picked up the nickname "Mr Deconfinement", after Mr Philippe chose the Republicans party mayor from Prades in the Pyrenees to co-ordinate France's strategy of lifting the lockdown.
He attended the same elite university as Mr Macron and Mr Philippe and, like Mr Philippe, was previously a member of the right-wing Republicans party.
On Friday evening, Mr Castex warned in a speech that "the health crisis is, unfortunately, not over" and that "the economic and social crisis is already here".
"Priorities will therefore have to evolve, ways of working will have to be adapted. We will have to unite the nation to fight this crisis that is setting in," he added.