This excerpt is taken from National Geographic’s new book All Over the Map, a guided tour through the world’s most incredible maps, assembled by Betsy Mason and Greg Miller, authors of the “All Over the Map” series.

In 1680, English pirate Bartholomew Sharpe and 300 men crossed the Central American isthmus at Panama, captured a Spanish ship, the Trinity, and used it to raid Spanish vessels up and down the Pacific coast of Central and South America. Their exploits became famous, in large part because they were a remarkably literate band of buccaneers: Five of the men, including Sharpe, kept detailed journals. (See also: Blackbeard Relics, Gold Found.)

From these accounts, we know that one of the most valuable treasures they seized was not gold or silver, but an atlas of Spanish sailing charts. Sharpe later commissioned a colorfully illustrated English copy of the stolen atlas and presented it to the king of England—a gift that likely saved his freedom, if not his life.

The daring theft occurred off the coast of Ecuador. Early on the morning of July 29, 1681, one of Sharpe’s men spotted the sails of a Spanish ship. The pirates gave chase, killed the Spanish captain in a volley of gunfire, and took the ship, the Rosario. Onboard, they found hundreds of jars of wine and brandy, some fruit, and a small amount of money. They transferred this prize to the Trinity before cutting down the Rosario’s mast and setting her adrift with her crew of 40 still onboard. The pirates also abandoned 700 slabs of a dull gray metal they believed to be tin. To their great regret, they later discovered it had actually been unrefined silver—a fortune that would have been “the richest Booty we had gotten in the whole Voyage,” one crew member wrote. (See also: The Real Pirates of the Caribbean.)

They did not, however, mistake the value of another item they found on the Rosario. Sharpe described it in his journal as “a Spanish manuscript of prodigious value.” One of his men wrote that it was “a great Book full of Sea Charts and Maps, containing a very accurate and exact description of all the Ports, Soundings, Creeks, Rivers, Capes and Coasts belonging to the South Sea, and all the Navigations usually performed by the Spaniards in that Ocean.”

By “South Sea,” he meant the Pacific Ocean. Vasco Núñez de Balboa, the first European to reach the Pacific via the New World, had crossed the narrow neck of land separating the Atlantic and Pacific at Panama in 1513, much as Sharpe and company had done. Because the overland route goes from north to south, Balboa called it the South Sea. (See also: Rare Spanish Shipwreck from 17th Century Found Near Panama.)

View Images The map is from a 1669 Spanish derrotero that historians once thought was the one captured from the Rosario. Its navigation directions and views of harbors as they would appear from out at sea would have been incredibly valuable to sailors at the time. More recent research suggests that this derrotero was actually captured a decade earlier by the famous pirate Henry Morgan. William Hack may have had access to (although it wasn’t his primary source). Courtesy The Huntington Library, San Marino, California

A century and a half later, the Spanish still controlled those waters, and the English desperately wanted a piece of the action. That’s why the Spanish maritime atlas, or derrotero, was so valuable. The crew of the Rosario had tried to throw the book overboard during the scuffle, but Sharpe somehow managed to save it (in his journal, he doesn’t say how, but he claims the Spanish cried when he got his hands on it).

After their encounter with the Rosario, Sharpe’s men continued to raid ships along the Pacific coast, causing huge financial losses for the Spanish, destroying 25 ships, and killing more than 200 men. When they eventually turned for home, they sailed to the south and rounded the tip of South America, becoming the first Englishmen to do so from the west.

View Images The pirate Bartholomew Sharpe hired London mapmaker William Hack to create an atlas based on a stolen Spanish derrotero. This map, added by Hack to show the route sailed by Sharpe and his men around South America, comes from a 1684 version of the atlas that was presented to King Charles II. Courtesy British Library, London, UK/© British Library Board. All Rights Reserved/Bridgeman Images

On his return to London in 1682, Sharpe found trouble waiting. The Spanish ambassador was fuming over the death of the Rosario’s captain and demanded that Sharpe be tried and hanged for piracy. Two witnesses gave compelling testimony against him at trial, and yet, surprisingly, he was acquitted.

The reason may have been the derrotero. Sharpe knew from the beginning that it would be of great interest to King Charles II. By the time the trial rolled around, the king had already seen it, and arrangements had been made to have an English copy made.

The cartographer hired to redraw the maps was William Hack, a former sailor who may or may not have once been a pirate himself. According to an essay by Edward Lynam, a former map curator at the British Library, Hack had evidently decided it was safer to make a living by “collecting, over a bottle of brandy in the local tavern, secret and exciting information from unemployed buccaneers and selling it to members of the Government and the aristocracy.”

Hack made several copies of a South Sea atlas based on the Rosario derrotero (to a lesser extent, he also appears to have used a derrotero that the pirate Henry Morgan stole). (See also: Captain Morgan's Cannons Found?)

View Images A page from the 1685 copy of Hack’s atlas showing the coastline of South America around Concepción, in what is now Chile. Hack notes that the Itata River (on the left side of the map) “is very populous of Spaniards & Indians who are in friendship with each other.” Courtesy National Maritime Museum, Greenwich, London

Hack’s colorful drawings are endearingly childlike, yet his handwritten descriptions of prevailing winds, safe anchorages, and local landmarks as they appear from sea would have been very useful for navigation. He depicts dozens of harbors along the coast of the Americas. Verdant hills dotted with trees and houses are a common feature, along with the occasional erupting volcano as on his rendering of Guatelmala.