In terms of overall popularity, pirates are like the tide; there’s an ebb and a flow when it comes to their presence in pop culture, as well as how eager audiences are for more of their seafaring adventures. Fifteen years ago, moviegoers flocked to theaters for the first of Captain Jack Sparrow’s escapades in 2003’s Pirates of the Caribbean: The Curse of the Black Pearl, and its resulting success would spur four sequel films, with a fifth reportedly still in the works.

When it came to the small screen, however, few networks were capitalizing on the swell of pirate fever until around 2014 — and then two threw their hats into the ring to produce shows set within the 1700s, in the midst of what has come to be known as the Golden Age of Piracy. NBC’s attempt, starring John Malkovich and The Crown’s Claire Foy, was called Crossbones, and quietly sank into cancellation after only six episodes. Meanwhile, on Starz, a little show named Black Sails was receiving mixed reviews, but subsequent seasons would earn praise from critics and fans alike. Black Sails sailed for a total of four seasons before concluding its story in April 2017, winning three Creative Arts Emmys for sound editing and visual effects, as well as nominations for its main title sequence and title theme, by Bear McCreary (who has also lent his composing skills to such genre shows as Battlestar Galactica and Outlander).

In fact, there’s probably no better way to illustrate the unique position Black Sails holds within the pirate subgenre than to mention its theme. Played over a gorgeously haunting opening credits sequence created by Imaginary Forces and directors Michelle Dougherty and Karin Fong, McCreary’s composition pairs the traditional elements of a pirate shanty (including a historically accurate stringed instrument called the hurdy-gurdy) with an undeniable hard rock melody. It perfectly sums up what audiences will be getting into by diving into Black Sails: a twist on the pirate stories of yore that we all grew up with, providing a fresh take on the legends of Edward “Blackbeard” Teach, Charles Vane, Calico Jack, and Anne Bonny, among others. Set around 20 years prior to the events of Treasure Island, the show also blends fiction and reality by incorporating early versions of characters such as Captain Flint, “Long” John Silver, and Billy Bones, offering a novelized account of what these men might have been up to prior to their appearance in Robert Louis Stevenson’s popular book.

Given that Black Sails is, technically, a Treasure Island prequel, it manages to walk a delicate line between relying too heavily on the story to come and winking at viewers who might be looking for the occasional easter egg. We know, inevitably, that there will be a pegleg and a possible parrot in the future, but when we first meet “Long” John Silver he’s known simply as John Silver (Luke Arnold), an enterprising schemer who cons his way into a position under Captain James Flint (Toby Stephens) as ship’s cook. How does his character evolve to eventually become Treasure Island’s main antagonist? That’s part of the ensuing journey that Black Sails hints at, and it all kicks off in Season 1 with, fittingly enough, the hunt for treasure. A Spanish galleon known as the Urca de Lima is the target, and everyone wants to get their hands on the treasure she’s carrying. Flint and his crew, which includes John and Billy Bones (Tom Hopper), are among the parties hungry for gold, as well as Black Sails’ undeniable pirate version of Bonnie and Clyde, Jack Rackham (Toby Schmitz) and Anne Bonny (Clara Paget), as well as the ruthless Charles Vane (Zach McGowan). Meanwhile, on New Providence Island in Nassau, chief goods dealer and supplier Eleanor Guthrie (Hannah New) struggles to maintain a relative sense of order while surrounded by lawlessness on all sides — with the assistance of her advisor, Mr. Scott (Hakeem Kae-Kazim), and in the background, cunning prostitute and later brothel madam Max (Jessica Parker Kennedy) allies herself with whoever she deems most likely to further her own success.

The beauty of Black Sails lies in its narrative thread of ambition, which takes root in all of its characters in myriad ways. Everyone has their own unique desires and goals, and everyone resorts to different methods in order to try and ensure that said desires are met. Given the era in which the series takes place, you might suspect that the female characters are at more of a disadvantage given their sex — but as the seasons progress it’s made abundantly clear that the women of Black Sails can be as ruthless as the men, if not more so. They’re just pulling from a different deck in order to win the game. Nowhere is that better illustrated than in the character of Max, who doesn’t necessarily grow beyond her circumstances so much as acquire an understanding of how best to manipulate them in order to serve herself. She provides something of a foil to Anne Bonny, who attempts to downplay her own femininity at nearly every opportunity as a female pirate usually surrounded by men. Ironically enough, the two eventually pursue a relationship later on in the series, proving that the old adage about opposites attracting still holds water.

That’s another advantage that Black Sails holds over similar genre shows: its delightful acknowledgment of and attention given to queer characters. Over the course of four seasons, several of the series’ main cast of characters find themselves pairing off with one another — whether a brief dalliance or a more serious romance, gender isn’t always a deciding factor. As previously mentioned, Anne Bonny and Max match up — but this happens while Anne is definitively tied to, and also very much in love with, Jack Rackham, a pairing that becomes one of the most defining ‘ships of the entire series. But the most surprisingly sweet and sweeping romance of all on Black Sails happens between two men. We learn that before Captain Flint was a pirate, he was a British naval officer and a gentleman known as James McGraw who fell in love with politician Thomas Hamilton. There are societal ramifications of their decision to pursue their feelings, but the show thankfully discards the cliched love-triangle trope, given that Thomas is already married. In fact, the convoluted dynamic between McGraw and Thomas’ wife Miranda arises as a result of their mutual affection and their love for the same man. When Thomas’ father imprisons him in a mental institution after learning of the affair, McGraw and Miranda are sent into exile, where they both take up residence around Nassau. Indeed, it’s the loss of his great love that eventually spurs McGraw on to become a pirate and change his name to Captain Flint.

But Black Sails isn’t a tragedy for all, and it’s how the show successfully sidesteps the unfortunate “Bury Your Gays” trope at the very end of its four-season run that serves as a testament to its refreshing creativity. It can be difficult to envision a happy ending for pirates, most of whom live and die by the sword or at the end of a plank — and of course, not everyone makes it through to the bittersweet end of Black Sails unscathed. Admittedly, the first season is a bit of a rough watch in retrospect, especially when it comes to the treatment of certain female characters — but after that the show noticeably course-corrects, leading to important growth and powerful, meaningful storylines. And at the end of it all, watching the series finale, there’s an unexpected sense of hope and order restored, knowing the trials that each of these individuals have undergone in order to make it to this particular vantage point. It’s not necessarily a “happily ever after,” but closer to a “happy for now,” and within the frequently grimdark realm of Peak TV, sometimes that’s more than enough.