A Moroccan journalist, allegedly being spied on by authorities using Israeli-made spyware called Pegasus, was detained and questioned by police Thursday after a dozen publications wrote about his case this week.

Omar Radi was in custody for six hours at the National Judicial Police Brigade headquarters in Casablanca and said afterward that he was told to expect further questioning.

Radi said authorities told him he was under suspicion for receiving funds from foreign intelligence agencies. In a text message, he called the accusations “not only unfounded but ridiculous … For me, this case is a worrying descent into hell for journalists in general who see their basic work criminalized.”

Radi had recently asked Amnesty International’s forensic technologists to inspect his phone after he suspected he was being monitored.

Amnesty released its finding Sunday to publications, including The Post, working with Forbidden Stories, a consortium of reporters investigating threats and violence against journalists. Amnesty’s report said technologists had determined the Pegasus software was used to hijack Radi’s phone when he attempted to connect to websites.

Pegasus is under scrutiny worldwide for allegedly selling its spyware to at least six countries that then use it to hunt down independent journalists and human rights activists.

A spokesman for the firm that owns Pegasus, NSO Group, has denied the software has been used against civil society groups and journalists and says it sells to states only to fight crime and terrorism. The firm says it conducts due diligence before deciding to sell its product to a country but then does not have control over it.

The drama of Radi’s situation unfolded Thursday morning when a government-friendly television station showed him, in slow motion, walking into police custody with a backpack slung over his shoulder as dramatic music blared over the footage.

Radi had told family and journalists that if he were not released by 5 p.m., they should become worried.

In 2019 Radi was arrested and given a four-month suspended sentence for “insulting a public servant” in a tweet in which he criticize a judge for sentencing protesters to up to 20 years in prison.

As the 5 o’clock hour approached Thursday evening, text messages flew from Morocco, to Europe and Latin America and the United States.

“It’s a very worrying sign,” said Sherif Mansour, the Middle East program coordinator for the Committee to Protect Journalists. “The government should be investigating the allegations he made instead. Moroccan journalists have been raising alarm about their own privacy this year.”

Morocco, a monarchy with an elected legislature, in recent years has further cracked down on dissident and independent media.

The Citizen Lab at the University of Toronto’s Munk School has reported that six countries, Bahrain, Kazakhstan, Mexico, Morocco, Saudi Arabia and the United Arab Emirates have used Pegasus against civil society groups, including, allegedly, Saudi journalist Jamal Khashoggi before he was murdered and dismembered by Saudi authorities.

A Morocco Embassy spokeswoman in Washington, Maria Bensaid, said in an email: “Unfortunately, due to the short notice, we are unable to comment other than to underline that we reserve the right to pursue legal action in case any unverified or false information is published on this particular case.”