RABAT, Morocco–In the wake of unprecedented Islamist explosions and attacks across North Africa, the foreign ministers of 19 states–including France and much of North Africa—launched an equally unprecedented response. Meeting in Morocco’s capital this past November, they vowed to pool their intelligence efforts against al Qaeda and its salafi fellow travellers. Their agreement, known as the “Rabat Declaration,” creates a counter-terrorism intelligence fusion center and formalizes its plans to share secret reports on terrorists. This is a major blow against al Qaeda’s North African affiliates, which have long exploited intelligence gaps among neighboring nations.

The Rabat Declaration has gotten little notice in Washington, but it signals that some major changes are underway in Europe and Africa.

France and Morocco have acted with vision and boldness. France sent French forces in Mali to combat al Qaeda affiliates there. For the first time in nearly 50 years, French ground forces fought the terrorists of Sahara and routed the Islamist enemy.

Morocco’s efforts were largely diplomatic, but, if anything, more dramatic. While the kingdom is America’s oldest ally in the region, it had been largely ostracized by neighboring Algeria. Algeria’s influence has long kept Morocco out of the African Union, the only nation on the continent to be excluded, and Morocco has been excluded from most major regional security initiatives. But when Islamist-inspired civil war ravaged neighboring Mali, Rabat did not stand idly by.

At first, the European Union and North African nations looked to Algeria to lead efforts to stabilize Mali. As Algeria’s francophone southern neighbor, Mali has largely been seen as part of Algeria’s sphere of influence. But Algeria did nothing. Algiers was consumed by a power struggle between the powerful Department of Intelligence and Security and the ruling FLN party. The battle turned on who would ultimately replace nation’s aging president, Abdel Aziz Bouteflika. So Algiers turned a blind eye as suffering in Malian cities mounted and refugees poured desperately into the desert. All Algeria could manage to do was patrol its own vast borders with Mali.

With Algeria on the sidelines, Morocco charged onto the field. The Moroccan king saw a chance to partner with the new French leader and forge a regional alliance to defeat the Islamists in Mali and contain the contagion of radical Islam. This is a major reversal. Long excluded, Morocco emerged to lead an African-French coalition against Jihadists in Mali. The king knew that, due to North African migration patterns from 1960 onward, the North African jihadist threat actually stretches from Congo to Belgium. That requires a broad strategy, encompassing intelligence and military operations, economics and, most controversially, religion. The regional intelligence sharing partnership, the “Rabat Declaration,” is now underway.

Morocco has also launched initiatives to boost trade and investment across the region. In the past decade, Morocco signed free-trade accords with the European Union and the United States. Now it is looking south. Morocco’s Attijariwafa Bank, which recently acquired a majority stake in Mali’s Banque Internationale, has innovative approach to emerging market banking. Many of its clients have opened their first bank accounts or taken their first bank loans in the past five years. Where Western banks only see risk, Moroccan banks see high-margin opportunities. Office Cherifien des Phosphates (OCP), the Moroccan phosphates company, increased mining operations in Mali (while its phosphate-made fertilizers have boosted food production there). These investments are creating economic growth, which should also minimize the appeal of radical Islam.

The third pillar of Morocco’s strategy is religion and it is the one that makes Western policy makers most uncomfortable. Raised in a culture that separates religion and politics, many Westerners intuitively believe it is wrong for secular parties to make religious arguments. And, they always say, it is the Jihadists who mix religion with politics. What they fail to fully grasp is that in Muslim countries, politics and religion are one.

In Morocco, King Mohammed VI is both the head of state and the highest religious authority, “Commander of the Faithful.” He has used his religious post to champion religious moderation and reform across North Africa and southern Europe, which is home to many Moroccan and Algerian migrants. Among his initiatives, the king dispatched Muslim preachers (imams) to French and Spanish cities to emphasize the religious errors in radical Islam.

King Mohammed VI has also engaged Mali on religious grounds. Almost 500 scholarships have been provided for imams from Mali to study in Morocco. The king has made two visits to Mali in the past year and met high-level clerics there. The king’s religious approach is building on a solid foundation. Morocco and Mali (and other North African nations) share the moderate Malikite School of Islam, which preaches deference to civil governments. The king wants to strengthen this school of Islam and inoculate other North African Muslims against it. Morocco and Mali signed a religious partnership agreement in November 2013, which pairs the religious affairs ministries of both nations and pledges each to promote Malikite jurisprudence. This pre-empts the appeals made by Saudi and Pakistani missionaries, who spent the past two decades trying to radicalize North African Muslims. Meanwhile, Morocco is building on its success in the religious outreach by announcing partnerships with Tunisia, Guinea, and Libya to jointly train imams and fight extremist ideas.

President Obama will host a U.S.-African summit in Washington, D.C. on August 4 and 5. American officials should take a closer look at Morocco’s case of deploying moderate Maliki Islam to combat radicalism. Like the Cold War, the War on Terror is a war of ideas. How to promote peaceful religious ideas should be a major focus of the U.S.-African summit, even if it makes some Westerners uncomfortable.