The Paris prosecutor's office opened a probe on Tuesday into allegations by investigative news website Mediapart and two of its journalists that they had been spied on using Pegasus spyware.
An investigation published on Sunday by 17 media organisations, led by the Paris-based non-profit journalism group Forbidden Stories, said spyware made and licensed by the Israeli company NSO had been used in attempted and successful hacks of 37 smartphones belonging to journalists, government officials and human rights activists.
Mediapart said in a series of tweets that Morocco's secret services had used Pegasus to spy on the mobile phones of two of its reporters.
Morocco has published an official statement rejecting what it called "unfounded and false allegations".
NSO said its product was intended only for use by vetted government intelligence and law enforcement agencies to fight terrorism and crime.