When tourists are involved, authorities in Morocco have seemed hesitant to describe attacks as acts of terrorism. On Oct. 5, for instance, Moroccan authorities were reluctant to label a knife attack in Casablanca as an act of terrorism, noting instead that the perpetrator, who injured three Dutch tourists and a police officer, was mentally disturbed. Similarly, authorities attributed a November 2015 knife attack on German tourists in Fez to the two assailants' drug use. But, as we've seen in past attacks, an attacker's mental health issues or criminal activities do not preclude support for extremist groups.

That Moroccan authorities would try to downplay any ideological motive in attacks on tourists is not surprising. Tourism there is an important industry, attracting some 10 million visitors each year. The country's leaders, aware of the devastating effects that jihadist attacks have had on tourism in Tunisia and Egypt, doubtless want to avoid casting the same pall over their own country. Despite their worries, however, Morocco faces a much lesser jihadist threat than do its neighbors in North Africa.

Morocco's Jihadists

With an estimated 1,200 to 1,500 fighters in Syria and Iraq, Morocco is one of the leading sources of foreign fighters for the Islamic State and other jihadist groups in the region. This is by no means a new phenomenon; Moroccans have left their country to fight jihad in conflicts as diverse as the wars in Afghanistan, Bosnia, Chechnya and Iraq. In the early 1990s, fighters returned from Afghanistan to found a jihadist group called the Moroccan Islamic Combatant Group, which strove to establish an Islamic polity in Morocco. Moroccans, moreover, have been involved in transnational jihadist groups such as al Qaeda since their inception. But the Moroccan contingent has consistently lacked the same level of tradecraft that jihadists from other countries have exhibited — though they often trained at the same camps. Consequently, its members have not risen to the upper ranks of these groups as Egyptian and Libyan jihadists have.

The so-called Sinjar records, a trove of personnel files that the U.S. military retrieved from an al Qaeda safe-house in northern Iraq, shed some light on this tendency. According to the records, Libya and Saudi Arabia supplied far more fighters than Morocco did, especially relative to their populations. Even so, Morocco was a leading country of origin for al Qaeda fighters in Iraq. In addition, of the nationalities represented in the Sinjar records, Moroccans were most likely to volunteer as suicide bombers, something that 91 percent of fighters from Morocco listed as their desired duty. This propensity for suicide bombing meant that fewer Moroccans survived to take the skills they acquired in Iraq back home.

A History of Lackluster Attacks

As a result, terrorist attacks in Morocco have long evinced a lack of competent planning or effective execution — even during al Qaeda's heyday. For instance, despite its scale, the group's May 2003 suicide bombing campaign in Casablanca claimed only 33 victims, although 14 bombers hit an array of soft targets in the city, including a restaurant, a hotel and a Jewish community center. In April 2007, Moroccan jihadists were ready to launch another suicide bombing wave in Casablanca, but authorities interrupted the plot. When police surrounded the building where four of the plotters were hiding on April 10, three of them blew themselves up, and a sniper killed the fourth. Two other suspects linked to the cell attempted an attack near the U.S. Consulate while on the run a few days later, but the only fatalities in the poorly executed operation were the bombers themselves. Even the deadlier attacks that have rocked Morocco — for example an April 2011 bombing in Marrakech that killed 17 people, most of them tourists — have been simple strikes on soft targets, not the larger, more sophisticated attacks seen elsewhere in the region.

Relative to other countries in the region, such as Tunisia, Algeria and Egypt — not to mention Libya and Mali, where jihadists have seized and controlled territory — militant attacks in Morocco are rare. Considering the volume of fighters that Morocco has contributed to the jihadist cause over so many decades, the dearth of spectacular terrorist assaults in the country may seem surprising. After all, the country suffers from the same economic and demographic problems that fuel jihadism in nearby countries. But Morocco for the most part has managed to suppress its jihadist threat.

What Sets Morocco Apart

One of the main factors helping to keep Morocco's jihadists in check is the competence of its security forces. The country's powerful intelligence agency, national police force, paramilitary police and Central Bureau of Judicial Investigations (Morocco's version of the FBI) work closely with their American and European counterparts, receive extensive training and are highly proficient. Moroccan intelligence has even helped to avert attacks elsewhere with the information it collects and shares. After the 2003 Casablanca bombings, an anti-terrorism law gave Moroccan security forces greater legal leeway to combat jihadism, and since then, authorities have been aggressive in pre-empting attacks and rounding up suspects. The legislation known as the Law to Combat Terror was strengthened in 2011, and in 2015, Morocco made it illegal for its citizens to attempt to travel to Syria or Iraq to join the Islamic State. Moroccan authorities have also developed sophisticated programs to help identify returning jihadists, monitor suspected returnees and counter the ideology of jihadism with theology. The programs have proved remarkably effective, especially when compared to the efforts of other countries in the region.

Because of Morocco's robust security environment, it is difficult for jihadist groups to establish operations in the country, despite the large number of militants who hail from within its borders. Even the Islamic State has struggled to deploy operatives in Morocco to conduct the kinds of attacks it carried out in Paris and Brussels. In fact, rather than attacking in Morocco as it has done elsewhere in the region, the Islamic State's affiliate in the Sahel region, led by Adnan Abu Walid Sahraoui, has merely issued an audio message calling for attacks there. Much like other jihadist groups' embrace of the leaderless resistance strategy, such a call is an admission of weakness by the Islamic State that indicates its inability to operate in Morocco.

These factors help explain why raids by security forces on suspected terrorist cells or grassroots attacks such as the Oct. 5 incident in Casablanca constitute the bulk of recent jihadist activity in Morocco. Barring some sort of dramatic political crisis that topples the Moroccan government and monarchy, this pattern will not change any time soon. Considering the country's economic and demographic challenges, the number of jihadists who have been radicalized there, and the waves of fighters returning from battle in Iraq and Syria, jihadism will remain a low-level threat in Morocco, as it will in European countries such as France and Belgium. But given the Islamic State's limited transnational terrorist tradecraft, the increasing pressure it is under and its ever-diminishing access to the outside world, the group will be hard-pressed to launch a spectacular terrorist attack in Morocco.