(Bloomberg) -- Greece’s top spy has stepped down amid allegations that a journalist and an opposition politician had their mobile phones targeted by spying software.

Panagiotis Kontoleon, the head of the national intelligence service, resigned Friday following a “mishandling of legal surveillance operations,” according to an emailed statement from the office of Prime Minister Kyriakos Mitsotakis. Kontoleon told a parliamentary committee that his agency had spied on a journalist, Reuters reported this week, citing two sources who it said were present at the meeting.

Adding to the turmoil in Athens, Grigoris Dimitriadis, the general secretary of Mitsotakis’s office and the premier’s nephew, quit earlier in the day. Neither Dimitriadis nor the government provided a reason for the decision.

A type of malware called Predator was deployed against Nikos Androulakis, the leader of Greece’s opposition socialist Pasok party, and journalist Thanasis Koukakis, according to forensic analysis by digital rights group Citizen Lab and the European Parliament respectively.

A report from Google’s Threat Analysis Group published in May suggested that the software is routinely used by “government-backed actors” in nations including Greece, Egypt, Indonesia and Spain.

Spanish Prime Minister Pedro Sanchez’s phone was hacked last year using similar Pegasus spying software and data was stolen from the device, his administration said in May.

Androulakis filed a complaint last week with the prosecutor saying that someone had tried to tap his mobile phone and intercept personal data. Koukakis has alleged that his smartphone was infected with surveillance software, prompting a separate investigation by a prosecutor.

©2022 Bloomberg L.P.