PARIS—President Emmanuel Macron has reappointed Sébastien Lecornu as prime minister, a post he quit less than a week ago, ratcheting up fears that France has become ungovernable.

In reinstating Lecornu, a close ally, Macron risks deepening the frustration of lawmakers in the fractious National Assembly, particularly leftist members who have demanded a break with the past.

It is also a sign of how Macron’s options have dwindled as he seeks a government capable of surviving a no-confidence vote and passing a budget that narrows the country’s gaping deficit.

The appointment capped a topsy-turvy week that began with Lecornu resigning just one month into the job, only to have Macron task him hours later with holding emergency talks with political parties to chart a path forward. That path evidently led back to a second run for Lecornu as head of government after Macron judged Lecornu could patch back together a loose coalition of centrist and conservative parties that effectively fell apart earlier this week.