King Mohammed VI pardoned three Moroccan journalists, as well as an activist and a historian, on Monday, to mark his 25th anniversary as monarch.
Rights groups had criticised the detentions of Moroccan journalists as repressive tactics to silence critics.
In total, 2,476 people were pardoned.
The decision coincides with the monarch's 25th anniversary on the throne.
Morocco's King Mohammed VI pardoned the three journalists who had been detained for years, and decided that hundreds of prisoners could see their sentences commuted.
Omar Radi, Soulaimane Raissouni and Taoufik Bouachrine, as well as historian and rights advocate Maati Monjib, were among the 2,476 people pardoned, a government official said on condition on anonymity.
The journalists were freed from prison in Tifelt, a town east of Rabat, to a group of ecstatic supporters.
Human rights activists applauded the pardons, but said the move didn’t exonerate what they have called the politically motivated manner in which Moroccan authorities pursued and prosecuted the journalists.
Lack of press freedom
Moroccan law affords the king, as head of state, the power to grant such pardons, which apply to the journalists’ prison sentences but not to the civil penalties or the money that courts ordered them to pay their accusers.
Rights groups including Reporters Without Borders (RSF) had denounced the jailings of Radi and Raissouni, detained since 2020 on charges of sexual assault they deny.
Human Rights Watch had often accused Morocco of using criminal trials, especially for alleged sexual offences, as "techniques of repression" to silence journalists and government critics.
The country's top court rejected in July 2023 the final appeals of two journalists.
Morocco ranked 129th out of 180 countries on RSF's 2024 World Press Freedom Index.
(with newswires)