Warning: contains SPOILERS for Our Flag Means Death.

Jim (Vico Ortiz) in the HBO comedy Our Flag Means Death is the only non-binary pirate aboard the Revenge, whose character was inspired by real life pirates. Our Flag Means Death puts a comedic interpretation on the true story of Stede Bonnet, a Barbadian pirate in the 18th century who once worked with Edward "Blackbeard" Teach. Also called the "Gentleman Pirate" for his aristocratic background and demeanor, Bonnet is regarded by some historians to be one of the most incompetent pirates in history. The show is created by David Jenkins, with Taika Waititi being one of the show's executive producers who also stars as Blackbeard.

As accurate as the show is to the true story's general specifics, Our Flag Means Death changes real life in a few ways. Revenge's crew, for example, consists of fictionalized characters due to no available record of who was part of the ship's 70-man crew. Pirates often grew their crews by kidnapping men from captured ships, taking in runaway slaves and indentured servants, or accepting desperately unemployed people. In Our Flag Means Death, Stede Bonnet (Rhys Darby) gathers an eight-man crew for his ship, who all found piracy as a last-ditch measure in life. In Jim's case, they became a pirate after murdering one of the several husbands of bar-owner Spanish Jackie (Leslie Jones), a powerful pirate queen in her own right in the Republic of Pirates.

Related: Our Flag Means Death Makes A Big Mistake With Its Blackbeard Flag

Jim, whose real name is Bonifacia Jiminez, isn't based on a real person, just like the rest of the crew in Our Flag Means Death. However, the character is inspired by real-life pirates Mary Read and Anne Bonny, according to Jenkins in a Mashable interview, though with the obvious deviation that Jim is non-binary. There are scarce s of non-male pirates in history, because having a woman on board was considered bad luck. Superstitious as they were, pirates believed that women on ships angered the sea gods and distracted their crew, thus causing stormy weather and poor seamanship. However, Read and Bonny are famous exceptions, pirating with John "Calico Jack" Rackam around the Caribbean during the Golden Age of Piracy before being captured by an English vessel and imprisoned in Jamaica.

Jim (Vico Ortiz) in Our Flag Means Death, episode 4

While neither Read nor Bonny were escaping a murder conviction, they hold other similarities with Jim. Read and Bonny, famous like Our Flag Means Death's Stede Bonnet, were crew on Rackam's ship, the Williams of Read's pre-pirate life are questionable in accuracy, but it's believed that Read worked on an English Man O War disguised as a man before ing a Dutch merchant ship in the Caribbean, which Rackam eventually captured. She continued her male disguise until fellow crew member, Anne Bonny, who was more cavalier about her female identity out at sea, tried to seduce her. Read revealed her gender identity to Bonny, and the two became friends. Rackam and the rest of the William's crew learned Read's secret, but continued respecting her. Meanwhile, Bonny became a pirate by starting an affair in the Bahamas with Rackam. She ed his crew to leave her husband. Bonny disguised as a man with Read when the William would attack other ships.

Unlike Stede Bonnet, whose more fortunate upbringing is further accentuated by s storytime gag, Jim was worked at Spanish Jackie's establishment before going on the lam. Like Read, Jim's limited options forces them into a masculine-presenting disguise for several weeks on the ship. However, Jim eventually relaxes the disguise and, like Bonny, presents as themself on the ship, going by both Jim and Bonifacia in Our Flag Means Death episode 4, "Discomfort In A Married State."

Next: Blackbeard's No Kill Rule In Our Flag Means Death Might've Been Real

New episodes of Our Flag Means Death release Thursdays on HBO Max.