TRIPOLI, Libya — Paul Greengrass’s “Captain Phillips,” an action movie starring Tom Hanks, dramatizes the hijacking of the cargo ship Maersk Alabama in 2009. The high-seas, high-stakes drama of Somali piracy has been a box-office hit.

But of the millions of people who will watch the movie, few will leave the cinema grasping the context of crime and terrorism in Somalia, even as this violence has had ripple effects like the recent terrorist attacks at a shopping mall in Nairobi, and accounts of religious radicalization of Somalis, from Minnesota to Norway.

Based on my fieldwork with Somali pirates, ransom negotiators, and naval officers in Kenya, as well as statistical analysis I conducted with Arjun S. Bedi, an economist at Erasmus University Rotterdam, I want to dispel some of the conventional wisdom about what is happening along the Horn of Africa.

Foremost, Somali piracy has all but vanished, but not for the reasons we think it has. Counter-piracy operations by multinational naval forces starting in 2008-2009, led by the United States, the European Union and NATO, have not contributed to the reduction in piracy. To the contrary, they have actually caused pirates to push out of the Gulf of Aden deep into the Indian Ocean and to adopt more sophisticated technology and weaponry in response.