Poland on Tuesday rejected accusations that it had used Pegasus spying software for political ends after a top lawyer opposed to the current government said he had been targeted.

"The suggestion that Polish services used operational methods for political ends is unjustified," said Stanislaw Zaryn, spokesman for the ministry in charge of the secret services.

Roman Giertych, a lawyer involved in several cases against the ruling Law and Justice (PiS) party, told Gazeta Wyborcza that Poland was using the spyware "to fight the democratic opposition".

"Using this type of programme to fight the opposition completely eliminates the sense of democratic elections," he said, explaining that the spyware was used ahead of the 2019 elections.

Ewa Wrzosek, a prosecutor and opposition figure, also said the spyware had been used against her. She had been alerted by Apple, she added.

Citizen Lab, a cyber-security watchdog based in Canada, confirmed it had looked into the use of Pegasus against Giertych and Wrzosek.

"We conducted these investigations and provided confirmation to the two named individuals that they were repeatedly infected with Pegasus spyware," John Scott Railton, a senior researcher at Citizen Lab, told AFP.

NSO has consistently denied any wrongdoing and defended use of its Pegasus software
NSO has consistently denied any wrongdoing and defended use of its Pegasus software AFP / JOEL SAGET

Smartphones infected with Pegasus are essentially turned into pocket spying devices, allowing the user to read the target's messages, look through their photos, track their location and even turn on their camera without them knowing.

The Polish channel TVN in 2019 reported that the country's anti-corruption agency had spent 7.6 million euros ($8.6 million) on phone spyware.

Zaryn said Tuesday the activities of "operational control" were carried out in accordance with the law only after obtaining the consent of the Prosecutor General and a court order.

He did not confirm or deny if Poland used Pegasus.

The NSO Group, the Israeli owner of Pegasus, told AFP it was sold "only to legitimate law enforcement agencies who use these systems under warrants to fight criminals, terrorists and corruption.

"Once a democratic country lawfully, following due process, uses tools to investigate a person suspected in committing a crime, this would not be considered a misuse of such tools by any means," a spokesperson told AFP.

Hungary earlier this year was the only EU country listed by an investigative journalism consortium as a potential user of Pegasus, with hundreds of targets including journalists, lawyers and other public figures.

A senior official in Hungary's ruling party Fidesz, Lajos Kosa, last month confirmed that the country had used the software.

In the latest in a string of commercial cases, Apple last month sued the Israeli spyware maker, seeking to block NSO Group from targeting the more than one billion iPhones in circulation.

NSO has consistently denied any wrongdoing and defended use of its software.