<P> In Saint Martin, a young astronomer and horologist named Carina Smyth is sentenced to death for alleged witchcraft, but escapes custody . She briefly crosses paths with Jack, who tries to steal a bank vault with his crew, but accidentally drag the entire bank with them and lose the fortune before crashing the building at the town's exit and escaping . Jack's crew end up abandoning him, even Gibbs who has lost faith in Jack . Depressed, Jack forsakes his magic compass to pay for a drink, subsequently freeing Salazar's crew from their imprisonment within the Devil's Triangle . Carina learns Henry is looking for the Trident's location and offers to help him using a diary left by her unknown father . Carina and Jack are both captured and face execution, but are saved by Henry and Jack's crew, setting sail on the Dying Gull . </P> <P> Carina deciphers that the stars will lead to an island where the Trident is hidden . Salazar destroys Captain Barbossa's fleet, but Barbossa manages to talk his way out of being killed by offering to help him find Jack, to which Salazar agrees . He tells Barbossa that long ago he worked for the Spanish Navy hunting down pirates . However, a young Jack tricked him into sailing into the Devil's Triangle, cursing his crew . Salazar pursues the Dying Gull, forcing Jack, Henry, and Carina to flee to an island while fighting off Salazar's cursed sharks, discovering that Salazar's crew cannot go on land . After saving Jack from a forced - marriage, Barbossa allies himself with Jack and provides him his compass, obtained from the sea witch Shansa . He uses the Sword of Triton to restore the miniaturized Black Pearl, trapped in a bottle by Blackbeard, to its original size but betrays Jack and takes the Pearl for himself once more . </P> <P> During the voyage, Jack and Barbossa realize Carina is the latter's long - lost daughter . Barbossa had left her at an orphanage with his diary so she could live a better life . Approaching the Trident's island, the Pearl evades a British Navy warship, which is destroyed by the Silent Mary before the Pearl run aground on the island . Jack, Barbossa, and Carina use the island's magic to open a path to the Trident's spot on the ocean floor, parting the ocean . Salazar captures Henry and possesses his body, chasing Jack and the others across the ocean floor and seizes the Trident, freeing Henry . Henry shatters the Trident, breaking all curses upon the sea and restoring Salazar's crew to life . </P> <P> However, the divided sea begins to collapse in on itself . The Pearl drops its anchor to lift them to safety, but Salazar, not satisfied with being human, follows Jack, still hell - bent on killing him . Carina realizes that Barbossa is her father when she spots a tattoo on his arm identical to the diary's cover . Barbossa sacrifices himself to kill Salazar, allowing the others to escape alive . Some time later, Henry and Carina reach Port Royal, where Will appears, free from the Dutchman . His wife, Elizabeth, appears moments later and the Turner family reunite . Jack watches from the Pearl sailing away into the horizon . </P>

Where was pirates of the caribean 5 filmed