If you had a childhood interest in pirates and a teenage love for economics, what would you do as an adult?

If you are George Mason University economics professor Peter Leeson, you write a book on the economics of piracy. That book, The Invisible Hook, is a rollicking good read—more fun than any person should be allowed to have without a parrot, a hook, and an eye patch. Leeson’s goal, however, is more than merely collecting entertaining pirate anecdotes.

Instead, he argues that the “rational choice [framework of economics] is the only way to truly understand flamboyant, bizarre, and downright shocking pirate practices.” Accordingly, as indicated by the subtitle, this book is part of Leeson’s larger and impressive research agenda on privately created law and order. That pirates are a suitable part of such an agenda becomes apparent, Leeson explains, once one realizes that pirates were stateless (and often violent) people who nonetheless organized crews of 80 or more for plundering expeditions.

Leeson presents his argument in six main chapters sandwiched between introductory and concluding chapters cleverly framed as a management course taught by Professor Blackbeard. Chapter two explains that pirate ships’ leaders were democratically elected and were constrained by a system of checks and balances. Lest one think rogues and sea dogs were principled Madisonians, Leeson explains that the organization of ships arose out of pirates’ prior experience on merchant ships. Such ships had autocratic, often predatory, captains to protect the investment of the vessels’ absentee owners from crew shirking or theft. By contrast, stolen pirate ships had no concern about absentee owners and were therefore free to create an organizational structure that minimized captains’ abusiveness.

Chapter three explores pirate codes, the constitutional framework underlying pirate societies. These codes, which had to be agreed to by all pirates on a ship, aligned incentives among pirates and their leaders by having egalitarian pay structures; sought to minimize conflict on ships by proscribing activities such as gambling, bringing women aboard, or drinking below decks after 8 p.m.; and specified penalties for transgressions. Remarkably, pirates established puritanical rules to increase crew cohesion in the pursuit of profit, albeit ill-gotten.

Leeson next applies the economics of signaling to explain pirates’ use of the “Jolly Roger” flag. Although pirates were willing and capable fighters, conflict risked bodily harm, damage to their ships, or destruction of the pirates’ booty. Hence skull-and-bones flags, which distinguished pirate ships from less fearsome state-sponsored vessels flying national flags, and signaled to potential prey that resistance would be met with death. The flag thereby served as a cost-minimizing device by inducing merchant crews to surrender rather than fight.

Signaling and reputation-building also help explain the practice of torture. Beyond scaring merchant ships into surrendering, pirates also sought the cooperation of their officers and crew, rather than passive resistance such as hiding valuable lucre. They carefully cultivated reputations for barbarous treatment, which terrified crews into making pirates’ profit-seeking easier. Besides using torture to weaken the passive resistance of captives (and occasional acts of arbitrary sadism), pirates also tortured would-be captors sent by the government and abusive merchant captains.

In chapter six Leeson turns his attention to pirate crews, arguing that pirates relied much less on conscription than popular portrayal would have us believe. Conscription, after all, would threaten the cohesiveness that pirates sought. It was also unnecessary: The combination of captain cruelty on legitimate ships and high remuneration on pirate ships produced a steady stream of would-be swashbucklers. The reason for the misinterpretation, Leeson suggests, is that pirates deliberately sought to make their voluntary participation appear to be conscription in order to minimize the legal consequences (likely hanging) should they be captured. As part of this ruse pirates even staged shows intended to fool onlookers into thinking that captives who were willingly joining them were instead being impressed.

Leeson also describes another surprising feature of pirate ships: Though slavery remained common and discrimination the norm, pirate crews contained a substantial contingent of black sailors. Not that they were paragons of tolerance—some of the black sailors were slaves.

Many, though, were free and equal members of pirate democracies. Leeson explains that slaves, like conscripts, endanger crew cohesion. The Public Choice logic of dispersed benefits and concentrated costs made racial tolerance preferable to slavery. While each pirate would have to divide any surplus generated by slaves with his crewmates, the costs—increased likelihood of capture and hanging if slaves hampered crew unity—were fully borne by each crew member.

Leeson’s book is magnificent. It also carries an important implication: If rogue pirates could organize themselves into relatively peaceful societies, then perhaps modern people should look less to coercive State solutions and more toward emergent order arising from voluntary human interactions.