Victor Lynn Lovelady, Gordon Lee Rowan, and Frederick Buttaccio were the three Americans murdered in Algeria last week; three of at least 39 foreign hostages killed by Islamic militants who captured a gas field near the Algeria-Libya border before being flushed out by an Algerian military assault. The rest of those killed were workers from the U.K., France, Japan, Norway, the Philippines, France, Colombia, Malaysia and Romania, as well as terrorists from Egypt, Mauritania, Nigeria, Tunisia, Mali, Algeria, France, and Canada. The terrorists that took the oil field demanded that the French cease their operations in Mali.

That there would be reprisals for the intervention in Mali should not come as a surprise. One of France’s chief counterterrorism judges said recently that France is now the number one target of jihadists in North Africa. France has tightened security since the intervention began, and the Danish foreign minister accepted that assisting the French-led intervention could increase the chance of an attack in Denmark.

While the European governments prepare for responses to the intervention in Mali, it's worth revisiting how we got here. The NATO intervention in Libya helped contribute to the conditions in Mali that led to a French-led intervention. After Muammar Gaddafi was overthrown, weapons came into Mali from Libya thanks to Tuareg fighters who had been fighting for the Libyan dictator. These Tuareg fighters began fighting for the independence of northern Mali, known as Azawad, and allied themselves with Islamist groups in the process. 

Although the Tuareg group, called the National Movement for the Liberation of Azawad, initially sided with Islamic groups like Al Qaeda-linked Ansar Dine, they eventually came into conflict with one another and the Islamist factions gained dominance in the region. The National Movement for the Liberation of Azawad is now allied with the French in their attempts to defeat the Islamists.

The situation in Mali became of increasing concern to the international community, especially after the Islamic militants began moving south. Although the U.N. Security Council had authorized an African-led mission to secure Mali it was unlikely that the force would be ready to deploy before September. In light of the Islamic militants advancing south, France intervened, a move that was later unanimously supported by the U.N. Security Council.

While it looks like the French and Malian forces are succeeding in pushing the Islamist fighters out of the territory they have captured, it is not at all clear that the intervention will have a net benefit for the stability and security of North Africa. The French-led mission is operating under a completely different understanding of geography, which is an advantage to the Islamist militants. French and Malian forces cannot enter other countries. However, Islamists fighters have no such problems entering Algeria, Niger, and Mauritania.

That the intervention in Libya caused a situation in Mali that has in turn led to a terrorist attack in Algeria does not exculpate the perpetrators of the attack on the Algerian gas field nor does it excuse the actions of Islamic extremists in Mali. Nor should the geopolitical impact of the overthrow of Gaddafi lead to any doubt of the good intentions of NATO officials.

However, what last week’s attack in Algeria shows is that the consequences of international interventions are impossible to wholly and accurately predict. If Western governments wish to execute interventions that depose foreign leaders who, despite their cruelty and evil, play a significant regional role, then Western governments should be prepared for the unintended negative consequences. It appears that the French have prepared for possible reprisals, having increased security in many areas. Yet the international diversity of the intervention in Mali means that France is not the only country with an increased risk of terrorism thanks to the intervention. The 2004 bombings in Madrid and the 2005 bombings in London are reminders that oftentimes it is not the strongest partner in a coalition that faces bloody reprisals.

French officials originally said that the French operation in Mali would last only weeks, however President Hollande recently said that France would be committed to the region until the Islamists are defeated and a legitimate government is ready to take over in Mali. Our intervention in Afghanistan provides a painful lesson that while modern militaries are good at killing their enemies, they do not necessarily provide what is necessary for legitimate and stable governments.

The situation in Mali also provides timely lessons about the unfolding situation in Syria, which is in many ways more potentially explosive than the situation in Mali given its proximity to Israel and also the fact that the conflict includes Al Qaeda-linked groups, Hezbollah, and Iran.

After the invasions of Iraq and Afghanistan, Western governments need to strongly reconsider their methods of fighting terrorism and addressing regional instability. Foreign occupation is a costly and deadly strategy, and it is far from obvious that it ensures or increases the safety of those living in the countries whose governments carry out invasions and occupations.

Editor's Note: This article originally misdescribed the attack in Algeria as a response to the French-led intervention in Mali. The attack was planned before France's Mali intervention.