Castex is the mayor of Prades, a town in the Pyrenees, and has been overseeing the exit from France's coronavirus lockdown.
French President Emmanuel Macron has named Jean Castex as the country's new prime minister, following the resignation of Edouard Philippe. A full government reshuffle is expected later.
Castex is a local mayor from the Pyrenees, and has been overseeing the exit from France's coronavirus lockdown. Until now a member of the right-wing "Les Républicains" party, he worked for former President Nicolas Sarkozy's team at the Elysée.
Macron had been expected to change the faces and direction of his government, especially in the wake of defeat in last weekend's local elections. In a major speech earlier this week, he said the "time has come to act" on the environment.
The appointment of Castex immediately brought angry criticism from the French left, who fear that little will change under another politician from the political right.
Edouard Philippe handed in his and his government's resignation to President Emmanuel Macron on Friday morning, and it was accepted, the Elysée announced earlier. A short news release said Philippe would continue to deal with everyday matters until the new government was appointed.
HIs departure is seen as amicable: indeed he has been offered a role coordinating Macron's "La République en Marche" (LREM) movement ahead of the next presidential election in 2022.
The outgoing prime minister had been in the post since 2017, when Macron came to power. Philippe was elected last Sunday as mayor of Le Havre, a post he had previously occupied for several years.
His successor faces a huge challenge as France, like other countries, battles the COVID-19 pandemic and its devastating economic fallout.
Who is Jean Castex and what's been the reaction to his appointment?
France's new prime minister is 55 years old and has been mayor of Prades, a town in the eastern Pyrenees, since 2008. For several years he was also a regional councillor in the southwestern Languedoc-Roussillon region.
His political experience at national level includes posts in the health and employment ministries in the 2000s, followed by a spell as an advisor and then senior official at the Elysée under President Sarkozy from 2010 to 2012.
Described as discreet and efficient, he has held a senior post involved in preparing for the Paris Olympic and Paralympic Games in 2024.
France's conservative "Les Républicains" (LR) party immediately distanced themselves from Castex following his appointment as prime minister. The LR president Christian Jacob described it as "technocratic", adding that Castex was no longer with the right-wing party.
The Socialist Party leader, Olivier Faure, said on Twitter the appointment by President Macron was no surprise. "The day after will be to the right, like the day before," he commented.
Watch the interview with Natalia Pouzyreff, MP from Macron's "La République en Marche" movement, in the video player below.
Changes follow local election defeat
The local election results saw the governing LREM movement suffer amid a "green wave" in which the main ecology party won control of several large cities including Lyon, Bordeaux and Strasbourg. The governing party also failed dismally in Paris and Marseille, France's largest cities.
The election outcome leaves Macron under pressure to focus more on environmental issues throughout the rest of his tenure, ahead of the next presidential election in 2022.
However, France is broadly divided between its more prosperous metropolitan areas where green issues have come to the fore, and smaller towns, peripheral districts and rural areas where priorities are often different.
Philippe's turbulent years as PM
Edouard Philippe helped found the mainstream conservative UMP party in France, which later became today's "Les Républicains".
From 2010 to 2017 he was mayor in the northern port city of Le Havre, where his popularity was demonstrated last Sunday when he was elected again, winning nearly 60% of the vote.
As prime minister, he oversaw Macron's programme which was seen politically as being on the centre-right.
His time in office coincided with massive social unrest which erupted in the autumn of 2018 when the "Gilets Jaunes" ("Yellow Vest") movement took to the streets. It began as a protest against planned fuel price hikes prompted by a new carbon tax, which were then abandoned.
Billions of euros were allocated to alleviating the problems of the less well-off but protests continued, having morphed into a wider movement demanding social change.
Edouard Philippe was in the front line politically during the coronavirus pandemic, which saw the government suspend planned pension reforms. His handling of the crisis won more support among the public than did Emmanuel Macron, according to opinion polls.
Doubt over Philippe's future at the head of the French government surfaced on Thursday over an interview Macron gave to regional newspapers.
The president lavished praise on his prime minister's "remarkable work" since 2017. "What we have succeeded in doing, with much confidence and coordination, is unprecedented," he said.
Macron was asked whether that meant Philippe was now "ancient history". "On the contrary," he replied. However, this phrase then disappeared from a subsequent version of the interview approved by the Elysée.
In France the president appoints the prime minister, who then runs the government under an overall strategy set by the president.
There has often been tension between those occupying the two posts, which in the past sometimes involved what was called "cohabitation", with president and prime minister belonging to rival parties.