The rag-tag bunch of sailors in the Pirates of the Caribbean series may be treacherous, but over the course of five movies, Captain Jack Sparrow (Johnny Depp) and his ilk prove there is some honor among thieves by (loosely) following the Pirates Code. A a higher edict that imposes some order among pickpockets and traitors, the code is first introduced in Pirates of the Caribbean: The Curse of the Black Pearl when Elizabeth Swann (Keira Knightley) claims parlay, a temporary truce with her attackers. Other rules from the Pirates Code are revealed when they become relevant, with a physical copy of code only unveiled at the end of the trilogy in Pirates of the Caribbean: At World’s End.

The Pirates Code was created by the Second Brethren Court, a group of nine Pirate Lords ruling over the nine seas. It was recorded by Morgan and Bartholomew, also pirates, and seems to be passed from sailor to sailor by word of mouth. Like many oral traditions, it has undergone revision and some specific details have been lost to time. The rules that are known are often used for personal advantage and interpreted in different ways depending on the situation.

Related: Pirates of the Caribbean: What Went Wrong With The Sequels

The Pirates Code is inherently contradictory. As a whole, pirates in the films are unrepentant rule-breakers, rebelling against the First British Empire and its strict social conventions. Sparrow says several times throughout the series that piracy represents freedom — from responsibility, civility and even morals. So despite the importance of the code, Jack Sparrow, Hector Barbossa (Geoffrey Rush) and other pirates constantly try to find ways around rules, sometimes adhering to the letter of the law and sometimes ignoring it in favor of embracing the spirit of piracy. As Jack points out, “The only rules that really matters are these: what a man can do and what a man can’t do.”

When it comes to following the code, characters draw the line in different places. The code allows for deceit and dishonor in pursuit of survival, but doesn’t always cover the depths of depravity the characters sometimes find themselves reaching. And in many cases, adhering to the code means lying, cheating and breaking the law in pursuit of something good. So what exactly does the Pirates Code cover? And when do the characters use it?

Waving A White Flag With Parlay

Pirates of the Caribbean Pintel Rigetti

The first and most important rule revealed from the code in Pirates of the Caribbean is the right of adversaries to claim parlay. When someone declares “parlay,” they can’t be harmed until after they’re taken to the captain to negotiate. The rule is first introduced in The Curse of the Black Pearl when Elizabeth invokes parlay to avoid being killed by Pintel (Lee Arenberg) and Rigetti (Mackenzie Crook). As per the code, Elizabeth is taken to Barbossa, then-captain of the Black Pearl, who agrees to stop attacking Port Royal in exchange for a piece of cursed Aztec gold.

Barbossa honors the agreement but keeps Elizabeth onboard in contradiction to her assumption that she’ll be taken to shore. So while Barbossa technically obeys the code, he sets a precedent for lying and using misdirection to gain a favorable outcome. As he says to Elizabeth, “The code is more what you call guidelines than actual rules.” Jack also uses parlay as a delay tactic later in the film, citing the rule to avoid being killed by the crew of the Black Pearl. The rule becomes a go-to reference for the characters until it’s revealed in At World's End that, per the original code, it can only be used by the Pirate King.

Related: Pirates of the Caribbean 6: Why Disney Is Rebooting The Franchise

Any Man Who Falls Behind Is Left Behind

Pirates of the Caribbean Isla De Muerta

The next rule is revealed as Will Turner (Orlando Bloom) and Jack sneak onto Isla de Muerta to rescue Elizabeth in Pirates of the Caribbean: Curse of the Black Pearl. As they enter into the lion's den, Jack explains that the code dictates pirates abandon any man who can't keep up with the crew. In true pirate fashion, Will takes ruthless advantage of this rule to cover up his betrayal of Jack. Will convinces the crew to leave Jack on the Isla de Muerta by saying he fell behind, when in fact, Will knocked him out and left him for dead.

Later in the film, the rule is cited by Joshamee Gibbs (Kevin R. McNally) when Elizabeth asks for his help saving Will and Jack. Gibbs and the crew refuse, saying there’s no need to rescue the captain when they already have what they want, the ship. Jack ends up being arrested and nearly hanged before Will pulls off a last minute rescue with the help of the Black Pearl’s crew, who come back for Jack in violation of the code. In this case, Gibbs' loyalty to Jack wins out. 

The Powers Of The Pirate King

Pirates of the Caribbean Brethren Court

Following the first Pirates of the Caribbean movie, the code is largely overlooked until it makes an appearance in At World’s End. As the East India Company bears down on Shipwreck Cove, the pirates convene the Brethren Court in an effort to try to decide what to do about the imminent attack. During the meeting, Barbossa claims that according to the code, an act of war can only be declared by the Pirate King, who is elected by popular vote.

The rule is confirmed by Captain Teague (Keith Richards), who is introduced as the Keeper of the Code. Teague lends some weight to the law by enforcing it through violence, eliminating anyone who suggests the code be ignored. When a physical copy of the law is brought out in the form of an ancient volume entitled the “Pirata Codex,” a hushed reverence falls over the room. With the rule verified, Jack uses it to his advantage, helping elect Elizabeth as Pirate King so everyone will go to war in accordance with his plan.

Related: Pirates of the Caribbean: What The "Mark" Was That Jack Left On Beckett

A Pirate Lord Shall Hand Down His Piece of Eight To His Successor

A collage of Jack Sparrow and his Piece of Eight

When Teague opens the Pirata Codex, he refers to the section governing the Pirate Lords and King, and in doing so, makes visible a couple of other rules written in the code. According to the Pirata Codex, someone can only be named a Pirate Lord if they’ve captained their own ship and killed a man in the last seven years. A Pirate Lord should also hand down his piece of eight to his successor “so all may know who be the Lords of the nine seas,” the code states. This rule comes into action when Sao Feng (Chow Yun-Fat) is killed in battle against the Flying Dutchman and hands off his piece of eight to Elizabeth, making her both captain and Pirate Lord. The rule is also important when it comes to Jack and Barbossa in Pirates of the Caribbean, both of whom were revived from death with the help of Tia Dalma (Naomie Harris) because they died before naming a successor.

Any Person Who Refuses To Serve Aboard A Pirate's Ship Must Die

Pirates of the Caribbean Blackbeard

In Pirates of the Caribbean: On Stranger Tides, it’s revealed that anyone refusing to serve on a pirate ship will be put to death. The rule is exemplified by the actions of Blackbeard (Ian McShane) who, after capturing a ship, kills everyone onboard save missionary Philip Swift (Sam Claflin). Philip is spared in violation of the code, with Blackbeard being persuaded to keep him alive by his daughter Angelica (Penélope Cruz). Later, Philip does perform some duties for Blackbeard, albeit unwillingly.

Profiting On Property

Pirates of the Caribbean bride auction revamp

Not all of the known rules of the Pirates Code can be found in the Pirates of the Caribbean feature films. In a short film entitled Tales of the Code: Wedlocked, an unnamed pirate — the auctioneer — references a rule saying he can resell products he owns at a profit. In this case, the auctioneer is referring to two “working girls,” Giselle (Vanessa Branch) and Scarlett (Lauren Maher) whom he is selling in a bride auction. As bidders fight over who should take home the ladies, the rule is used by the auctioneer to lay claim to the astounding amount of money offered. Like all scenes in Tortuga, the conflict ends in a physical fight — but the dozens of pirates in the room do respect the code. 

The Division Of Treasure

Pirates of the Caribbean Treasure

Two rules concerning the division of treasure are also revealed in Pirates of the Caribbean: The Complete Visual Guide. According to the Article II, Section I, Paragraph VIII of the code, each crew member is entitled to an equal share of any treasure they find. The rule calls back to a moment in The Curse of the Black Pearl when it’s explained that Jack revealed the location of the Isla de Muerta treasure when the crew demanded his information be shared equally. According to Article II, Section II, Paragraph I of code, whoever first spots a treasure-laden ship can choose the best pistol for themselves. This rule never comes into play in the series, but it does fit with the character of the code, which embraces a first-come, first-served philosophy.

Related: Pirates of the Caribbean: Why Davy Jones Killed The Kraken (& How)

Marooning and Mutinying

Pirates of the Caribbean Jack Elizabeth Marooned

In addition to the explicit rules of the Pirates Code, there are a couple of rules that are followed throughout the Pirates of the Caribbean series but are not identified as being part of the code. When discussing how Jack was marooned by Barbossa and the crew of the Black Pearl, Gibbs says that whenever a pirate is marooned, he’s given a pistol with a single shot, presumably with which to commit suicide. Jack cites this rule when he is later marooned with Elizabeth and is subsequently given back his pistol. The pistol in question is eventually used to kill Barbossa, Jack’s mutinous first mate, as he planned.

A rule against mutiny is also mentioned in passing by Pintel and Rigetti as they discuss how "Bootstrap" Bill opposed Barbossa’s mutiny against Jack. According to Pintel, Bill “said it wasn’t right, with the code.” The punishment for mutiny can vary, but mutineers are typically put to death, according to Blackbeard in On Stranger Tides. “Our laws be clear,” he says to Angelica as she asks him to show mercy on a mutineer.

More: Every Pirates of the Caribbean Movie Ranked Worst To Best