Morocco and Hungary denied media reports on Monday that they had used secret software to infiltrate the smartphones of investigative journalists and other public figures.
Rabat said it had "never acquired computer software to infiltrate communication devices" and denied it had "infiltrated the phones of several national and international public figures and heads of international organisations through computer software".
Hungary issued a similar repudiation.
"The government has no knowledge of this type of data collection," Foreign Minister Peter Szijjarto told a press conference, adding that Hungary's civilian intelligence agency did not use the Pegasus software "in any way".
A joint investigation by several Western media outlets said Sunday that numerous activists, journalists, executives and politicians around the world had been spied on using the software developed by Israeli firm NSO.
The media outlets, including The Washington Post, The Guardian and Le Monde, drew links between NSO Group and a list of tens of thousands of smartphone numbers, including those of activists, journalists, business executives and politicians around the world.
Many numbers on the list were clustered in 10 countries, including Morocco. Hungary was the only EU country named on the list of leaked telephone numbers.
Rabat expressed "great astonishment" at the reports.
These are "false allegations devoid of any foundation," its statement read.
"Morocco... guarantees the secrecy of personal communications ...to all citizens and foreign residents in Morocco", it added.
According to the reports, phones monitored in Hungary included those of two investigative journalists, the owner of a news site critical of the government, an opposition mayor and several lawyers.
Janos Stummer of the opposition Jobbik party, who serves as head of the parliamentary National Security Committee, demanded "consequences".
Stummer sought to convene the committee to question intelligence chiefs, and Szijjarto said the secret service head would attend the meeting if called.
The committee's Vice-President Janos Halasz, a member of Orban's ruling Fidesz that has a majority on the committee, said however that the body did not need to meet.
The "left-wing" press reports were "unfounded", said Halasz.
The National Association of Hungarian Journalists (MUOSZ) said it was "shocked" by the revelations.
"If this is the case, it is unacceptable, outrageous and illegal, full information must be disclosed to the public immediately," the association said in a statement.
The reports "bring shame to the country", said Budapest Mayor Gergely Karacsony, who hopes to run against Orban at a general election next year.
"The government owes answers," he said.
Pegasus is a highly invasive tool that can switch on a target's phone camera and microphone, as well as access data on the device, effectively turning a phone into a pocket spy.
In some cases, it can be installed without the need to trick a user into initiating a download.
NSO has denied any wrongdoing.
(FRANCE 24 with AFP)