Spanish Prime Minister Pedro Sanchez on Saturday announced a reshuffle of his left-wing cabinet.
Sanchez, the leader of the Socialist Party (PSOE), heads a government coalition with the hard-left Podemos party.
In a statement released as he was meeting with King Felipe to declare his intent to change the composition of the cabinet, the presidency said the new government's "main objective will be the economic and social recovery of the country."
Podemos retains its five portfolios, with the changes affecting only some of the 17 portfolios held by PSOE members or personalities close to them.
Sanchez said in a brief speech from the Moncloa Palace, the seat of government, that the new government represents "a generational renewal" as the average age is brought down from 55 to 50 while women will represent almost two thirds (63%) of the 22 ministers, instead of 54% in the previous government.
"This will once again make our country a benchmark in terms of gender parity," Sanchez said.
The first change announced was the departure of Arancha González Laya from the Foreign Ministry, with José Manuel Albares, the country's ambassador to France, replacing her.
Socialist Carmen Calvo, until then First Vice-President and Minister of the Presidency and Relations with Parliament, is also leaving the executive.
Juan Campo is out as minister of justice with Judge Pilar Llop taking his role. He will leave the presidency of the Senate to take over.
The reshuffle comes at a time when the government has been very weakened in recent months by various setbacks and controversies.
Three months ago, the executive was dealt a terrible blow in the regional elections in Madrid, a historic bastion of the right, where the PSOE and Podemos suffered a rout against the conservative Popular Party (PP), which presented the vote as a kind of referendum on government policy.
The government's decision at the end of June to pardon Catalan pro-independence leaders imprisoned following Catalonia's failed secession attempt in 2017 has also sparked disapproval from a large part of public opinion, according to several polls, and provided ammunition to the right-wing opposition.