French President Emmanuel Macron on Thursday reshuffled his ministers for key domestic portfolios such as education, housing and urban affairs, as his government begins its response to riots that shook the country three weeks ago.

Macron has struggled to relaunch his second term in office, which has been plagued by domestic crises including months of protests over pension reform as well as the five days of riots over the police killing of a teenager of Algerian and Moroccan descent at a traffic stop.

The most high-profile change was at the education ministry, where Pap Ndiaye, a Black studies university expert who had become a target of right-wing, conservative attacks, was replaced by budget minister Gabriel Attal, 34.

Attal, a rising star among Macronistas, became France’s youngest cabinet member at 29 when he joined government in 2018. He gained a reputation as a quick-witted, politically astute loyalist as government spokesman, before being appointed to the powerful budget portfolio.

Macron also resurrected the urban affairs ministry, naming Sabrina Agresti-Roubache, a lawmaker of North African descent born in one of Marseille’s northern housing blocks, to the post. The mayor of Dunkirk was brought in to run the housing ministry.

The new health minister, Aurelien Rousseau, won plaudits for running the public health authority in the Paris region during the COVID-19 pandemic, before becoming Prime Minister Elisabeth Borne’s chief of staff last year.

Borne, Finance Minister Bruno Le Maire, Foreign Minister Catherine Colonna and Interior Minister Gerald Darmanin all remained in place.

In a pep talk to his lawmakers on Wednesday night, Macron said the government should refrain from imposing knee-jerk responses to the riots and look at what happened “in-depth” before drafting new policy, which he said could not simply consist of pouring more money into urban regeneration or adding more police.

“We’re in a spirit of continuity but let’s not pretend as if there hasn’t been something that stunned the country for a few nights,” he told them.

The reshuffle marks the departure of many figures from civil society, one of the hallmarks of Macron’s promise to renew French politics in 2017, while the newcomers have mostly already gained political experience in parliament or as mayors.

It also exposes Macron’s limited room for manoeuvre, having been shorn of his parliament majority in elections last year.

Macron has failed to convince the conservative Les Republicains party to join forces with his minority party to form a government coalition, and will therefore continue to pass legislation on an ad-hoc basis, bill by bill.

Macron decided this week to keep Borne at the helm of cabinet, despite calls from political rivals and even some government insiders for her to go.

Other figures who had caused embarrassment to the government in recent months, including a junior minister who had posed for the cover of Playboy magazine during the pension reform crisis, left the cabinet.