Prime Minister Pedro Sanchez, Defense Minister Margarita Robles and several supporters of Catalonian independence were among those targeted by the spyware, developed by an Israeli surveillance company called NSO Group.
Spain’s National Intelligence Centre (CNI) has been criticized for its role in spying on Catalan separatists and taking a full year to discover that the handsets of the prime minister and key defense and security officials had been breached, possibly by a foreign power.
During a closed-door parliamentary hearing last week, CNI director Paz Esteban admitted that she had given permission for her agency to hack the phones of several separatists.
Ms Robles announced that Ms Esteban would leave her post.
Ms Esteban will be replaced by Esperanza Casteleiro, who has worked for almost 40 years at the intelligence agency and most recently served as the secretary of defense.
‘External power’ blamed for Pegasus breaches
In a separate case, the government recently revealed that an “external” power had used Pegasus software to infect the phones of Ms Robles, Mr Sanchez and Interior Minister Fernando Grande-Marlaska last year.
Last month, Canada’s digital rights group Citizen Lab said more than 60 people linked to the Catalan separatist movement had been targeted by the spyware, which was developed by an Israeli surveillance company called NSO Group.
The software has allegedly been used to target journalists, political dissidents and human rights activists.
Pegasus has regularly been linked to activities by repressive states to target people perceived to be challenging the power of leaders. The company says it investigates these abuses seriously.
The attacks took place between May and June 2021, while there was an ongoing diplomatic row between Spain and Morocco – but it is not publicly known who is responsible.
Mr Sanchez’s minority left-wing coalition relies on support from Catalan separatist parties which have threatened to pull their support if the government does not admit responsibility for the hacking.
The leader of Spain’s opposition conservatives, Popular Party president Alberto Nuñez Feijoo, criticised the sacking, saying Mr Sanchez had sacrificed her for the Catalan separatists, “weakening the state to assure his survival”.
Ms Esteban’s predecessor came under fire in 2017 for failing to stop preparations for a Catalan independence referendum that had been deemed illegal by Spain’s top courts.