Emmanuel Macron had been widely anticipated to steer his presidential vehicle to the left during the rest of his term in office, prioritising social and green issues.
France, like other countries, faces a monumental challenge in fighting the coronavirus pandemic and its catastrophic economic fallout, which is expected to worsen in the coming months.
The policies from Macron's first three years in office have been largely seen as more in tune with the right, and the popularity of the government and the president himself is in a rut.
Last weekend's local elections saw the president's "La République en Marche" (LREM) movement suffer heavy defeats, failing to capture any large cities and enduring a rout in some places.
So many have reacted with surprise at his replacement as prime minister of one figure from the political right with... another figure from the political right, Jean Castex.
'Edouard Philippe without the beard'
Macron's meteoric rise to power saw his young movement burst through the middle as the political establishment imploded on left and right, and the new president picked off recruits from both broken parties.
Hence the disappointment and anger now among many on the left.
Condemnation started pouring in even as news of the appointment was still pinging on people's phones. Jean Castex will simply be a "clone" of the outgoing premier, critics say, "Edouard Philippe without the beard".
But with under two years to go until the next presidential race, there are signs that the move to Matignon of the mayor from the Pyrenees could be a shrewd political act.
Despite his troubles, Emmanuel Macron has had some success in the first half of his presidency in wooing the traditional centre-right in France. Castex's nomination certainly seems to have wrongfooted his former allies from the "Les Républicains" party, whose leadership quickly disowned him.
Among the little that is known of the next prime minister, Castex is spoken of as down-to-earth and popular with the grassroots in Prades, the town in the "Pyrénées-Orientales" where he has been mayor since 2008.
This could be to the advantage of Macron's movement, which has had difficulty putting down roots around the country. The new prime minister also has a track record in administration at both local and national level.
What's more, the circumstances of Edouard Philippe's departure suggest less of a rift with his former boss than some had thought.
The ex-prime minister, who will return to his fiefdom of Le Havre where he has once again been elected as mayor, has also been offered the role of coordinating the governing LREM group in parliament, where it has suffered bouts of infighting and lost its overall majority in the spring.
2022 presidential race in mind
Emmanuel Macron was not particularly popular even in 2017, the scale of his victory magnified by the electoral system and voters' hostility towards his run-off rival Marine Le Pen.
Then and now he was detested on the political left, and with his new choice of prime minister he may have calculated that there would be little to gain -- and much to lose on the right -- from trying to appease his leftist detractors.
But political manoeuvring is one thing, tackling effectively today's colossal domestic and global problems is quite another.
The president has promised to look positively at almost all the recommendations from a Citizens' Council for the Climate, tasked with coming up with concrete solutions in the wake of the "Gilets Jaunes" ("Yellow Vest") movement.
The "time has come to act", Macron said earlier this week as he outlined his green agenda. French voters on both sides of the political divide will be looking to hold him to his word.