Jack Sparrow and the Black Pearl made us fall in love with the world of pirates. But if you’ve been watching Pirates of the Caribbean without understanding the historical context, here are some things to keep in mind when you watch Dead Men Tell No Tales this weekend.

It’s easy to just think of pirates as the swashbuckling heroes we’ve come to know through the movies, but all stories are born from facts, and pirates were real people with real motivations, in a very complicated moment of human history.

Here are some historical facts to help you understand exactly what was going on before, during, and possibly after the events in the Pirates of the Caribbean films.

What was the ‘Golden Age of Piracy’?

Back in the 17th and 18th centuries, trade between Europe and the New World was ripe for profit. Scholars can’t agree about which specific years constituted the so-called Golden Age of Piracy, but most coincide in saying that it was around 1650 to 1720.

Buccaneer was a term originally given for the English and French who settled in the island of Hispaniola (currently half-Haiti, half-Dominican Republic), and were eventually displaced by Spanish colonizers and forced into piracy to survive. They moved to Tortuga, from which they sailed out, sometimes in very large fleets, to attack and pillage ships — and sometimes towns. They constituted the first wave of piracy that plagued the Caribbean.

During the Golden Age of Piracy, pirates did go after treasure. But most of the riches they acquired from the ships they attacked came in the shape of food, fabric, tobacco or cocoa.

By the 18th century, most of these riches came through the East India Trading company, which was also a great power in the transatlantic slave trade — in which ships sailed from Europe to Africa, brutally enslaved African people, and transported them in horrifying conditions to the Americas. This was the sort of ship that Jack Sparrow was charged to captain by Cutler Beckett, the slaves of which he liberated.

European nations were mostly unable, at first, to do much to defend their ships against the increasing number of pirates in such distant waters. One of the solutions they eventually came up with was to employ privateers — who were essentially pirates themselves, but officially authorized to attack ships from rival nations with no consequences as long as they paid a share to the government. That way, Europe could somewhat mitigate its losses. But for a very long time, piracy was growing at such an alarming rate that it nearly ran unchallenged.

What were pirates really after?

“Wherever we want to go, we’ll go. That’s what a ship is, you know. It’s not just a keel and a hull and a deck and sails, that’s what a ship needs but what a ship is… what the Black Pearl really is… is freedom.”

While pirates were notoriously violent criminals who could carry out some of the worst acts of cruelty, there is some truth to the more romantic angle of Jack’s perspective.

The War of the Spanish Succession took place in the early 18th century, and its end brought a new wave of piracy to the Caribbean. Thousands of well-trained soldiers suddenly found themselves without work, just as trade between Europe and the American colonies was rising rapidly, and naturally found work in merchant ships.

But conditions on merchant ships were famously terrible. With low wages, terrible hygiene and cruel captains, merchant sailor death rates were ridiculously high. Piracy began to look much more appealing: a pirate could make much more by attacking a ship full of riches than by manning one.

Pirate ships tended to function as a much more egalitarian society (although it wasn’t free of conflict). While there was a certain hierarchy to be followed, there was also the possibility of electing a captain, and less of a difference between social classes — men could find their place on a pirate ship whether they came from aristocracy, or absolute poverty… and in some cases, even from slavery.

In a world that was increasingly controlled by oppressively powerful nations, piracy was the ultimate form of freedom in the Caribbean — a lifestyle that, though short, could be more fruitful than a lifetime on land.

How did piracy end in the Caribbean?

Well, it didn’t… not exactly. There are still pirates in the Caribbean, but without the adventurous glamour we’ve come to associate with fictional pirates, the reality looks quite violent and frightening; they currently deal mostly in drug contraband.

But Jack Sparrow’s particular brand of piracy ended sometime after the mid-1750s. In fact, the period of time in which the wildest pirate adventures took place was relatively short, since governments eventually supplied their navies with more protection.

Conditions for sailors were significantly improved, and many of the unemployed who previously would have turned to piracy were now employed by respectable ships. Tortuga started losing importance, and Nassau was one of the last standing pirate havens before it too, lost its pirates. By 1720, piracy had already significantly diminished, and in the second half of the 1700s it had mostly disappeared.

This puts the pirates we know from Pirates of the Caribbean in an interesting position, with the story taking place somewhere between 1720 and 1750, according to the writers. Cutler Beckett himself states: “Jack Sparrow is a dying breed.” The Brethren Court’s last stand, and the freeing of Calypso, through which they originally held power over the seas, might very well be a historically-accurate metaphor of pirates’ loss of power over the Caribbean.

According to history, most of the remaining pirates escaped towards West Africa, where the slave trade continued and maritime traffic still offered a chance of profit. But of course, most pirates didn’t survive long at all — it wasn’t exactly a safe lifestyle, and between injuries from fights with others or among themselves, and the general dangers of seafaring, most of them died very quickly.

Others (like Barbossa, as we saw in Stranger Tides) were actually hired by those who had previously hunted them, employed as privateers to catch those who at some point might have been their colleagues. A rare few might have been able to retire with their riches, and evade capture entirely.

Which of these fates will be met by Jack Sparrow and the characters he’s met along the way? We don’t know. But if Dead Men Tell No Tales or subsequent films are going to stick to history (as much as they can, with undead pirates and immortal tentacle-faced captains), then the future of Pirates’ characters is going to be very interesting to watch.

What are you hoping to see in ‘Dead Men Tell No Tales’?