The Moroccan government has pardoned some 29 people convicted of "terrorism or extremism".
This was "after officially expressing their attachment to the constants and sacredness of the nation and national institutions, revising their ideological orientations and rejecting extremism and terrorism," the justice ministry said in a statement on Sunday.
As a result, 23 pardoned persons will be released, while the remaining six will have their sentences reduced.
In 2017, the country launched a rehabilitation programme called "Reconciliation" (Moussalaha) in its prisons, targeting prisoners convicted of "terrorism" who wish to repent.
Since 2002, Morocco has dismantled more than 2,000 jihadist cells and arrested more than 3,500 people accused of links to radical Islamist groups.
In total, Mohammed VI pardoned 958 people sentenced by the country's various courts on the occasion of the Eid el-Fitr holiday, which marks the end of Ramadan, the fasting month for Muslims.