CASABLANCA — Morocco is no stranger to the jihadist violence afflicting other Muslim countries: In 2003, a suicide bombing killed 33 people in the country's largest city, Casablanca, while a 2011 attack killed 17 in Marrakesh. But unlike most of its neighbors, Morocco has a detailed policy to reform rather than destroy followers of Salafism, the ultraconservative movement in Sunni Islam that's often considered a gateway to jihad. According to Aujourd'hui Le Maroc, even the most extreme Salafists are now joining political parties ahead of Morocco's general election in October.

It was after the Casablanca attack that Moroccan authorities embarked on a counter-radicalization program to reform local Islam by promoting a more tolerant school of thought, including acceptance of the Moroccan king's role as "Commander of the Faithful." While ostensibly ruled by parliament since reforms passed after Arab Spring protests in 2011, Morocco is still primarily run by King Mohammed VI, who holds executive power.

The monarchy pardoned several Salafist fighters in recent years, and opened a school for local and foreign imams in 2015 to exert authority over "Moroccan Islam" and suppress radical movements. Thirteen years since Casablanca, the strategy seems to be working: Prominent Salafists such as radical preacher Abdelkrim Chadli have embraced electoral politics, and many more have pledged allegiance to the monarchy. Several parties in Morocco's parliament, including the main opposition forces Istiqlal and Authenticity and Modernity (PAM), have recruited dozens of Salafists as legislative candidates for October.

Despite holding ultimate authority, the monarchy has allowed Islamists into positions of power: The Justice and Development Party, formerly affiliated to the Muslim Brotherhood, won Morocco's first competitive elections in 2011 and installed its leader as Prime Minister. Now even the most conservative Moroccans may express their views at the ballot box, with two convicted but pardoned organizers of the Casablanca bombing in talks to run for parliament for a small royalist party.

If Morocco can continue on its path of reform, it may provide a model for other countries in the region — the Salafists say so themselves.