The New York-based advocacy group Human Rights Watch says "Moroccan authorities have developed and refined a full manual of techniques to muzzle the opposition, even as it claims to be simply applying the law against them in a neutral manner."
The NGO presented the findings in a 141-page report focusing on eight journalists and public figures prosecuted in cases it said were really "veiled political attacks".
It accused the Moroccan court system of "procedural flaws that taint the handling of these cases".
Two of the most prominent cases are Omar Radi and Soulaimane Raissouni, both sentenced on appeal this year on sexual abuse charges to six years and five years in jail, respectively (Radi was also accused of "espionage").
Another, Taoufik Bouachrine, was jailed in 2018 for 12 years on accusations of rape and people-trafficking, a sentence increased to 15 years on appeal by the public prosecutor.
All three have a history of critical reporting on the country's authorities, and they have all denied the charges against them.
Morocco has insisted that its justice system is independent and that the cases had "nothing to do" with the men's journalist work.
HRW however said that "trials targeting opposition figures are often marred by serious violations of the right to due process."
It cited the "prolonged and unjustified" year-long pre-trial detentions of both Radi and Raissouni -- the longest allowed under Moroccan law.
The rights group also cited the judiciary's refusal to hear defence witnesses, "without providing reasonable justification".
It also accused pro-government media outlets of "ferocious defamation campaigns" against Radi and others, which included revealing personal details of family members in what HRW said was an effort to intimidate them.
On top of that, it accused Moroccan authorities of spying on critics of the government, including with the controversial Israeli-made software Pegasus.
Investigative journalistic outfit Forbidden Stories and rights group Amnesty International last year accused Morocco of using Pegasus against multiple targets at home and overseas.
Morocco denies the allegations and has opened libel cases in France and Spain against journalists making the claims.
HRW urged Rabat to "respect the right to peaceful expression" and "put an end to the methods used against critical journalists, human rights defenders and civil society activists".
It said its report was based on interviews with 89 people both in Morocco and abroad.
Moroccan Justice Minister Abdellatif Ouahbi was asked Monday in parliament about "the practises of certain foreign human rights organisations".
Morocco accepts their observations but "refuses the bad faith exploitation of the reports for political purposes".