Abstract In spite of general agreement that establishing the rule of law is central to properly functioning economies, little is known about the cost of law and order breakdowns. This paper studies a specific context of this by estimating the effect of Somali piracy attacks on shipping costs using data on shipping contracts in the dry bulk market. To estimate the effect of piracy, we look at shipping routes whose shortest path exposes them to piracy and find that the increase in attacks in 2008 lead to around a 8 to 12 percent increase in costs. From this we calculate the welfare loss imposed by piracy. We estimate that generating around 120 USD million of revenue for Somali pirates led to a welfare loss in excess of 630 USD million, making piracy an expensive way of making transfers. * We are grateful to the editor, referees, Daron Acemoglu, Elhanan Helpman, Marit Rehavi and a number of seminar participants for useful comments and advice. We also thank Dieter Berg, Tilman Kratz, Richard Mcenery, Richard Neylon, and Neil Roberts for their many helpful insights into the workings of the industry. Ali Saadatnia and Alessandro Torti provided valuable research assistance. We thank the International Growth Centre (IGC) at LSE for financial assistance in collecting the data. For additional support, Besley thanks CIFAR and Martin Newson, Fetzer thanks the Konrad Adenauer Foundation and Mueller thanks Spanish Ministry of Economy and Competitiveness through the Severo Ochoa Programme for Centers of Exellence in R&D (SEV-2011-0075), from project number ECO2012-37857 and the Ramon y Cajal programme. Responsibilty for errors lies with the authors