Updated

Editor's note: The following excerpt is from "Thomas Jefferson and the Tripoli Pirates" by Brian Kilmeade now available in paperback.

Commodore Edward Preble, commander of the USS Constitution, had spent much of the summer of 1804 dealing with heavy seas of the Tripoli coast where he tried to maintain his blockade. He had been hand-picked by President Thomas Jefferson because of his reputation as a leader who would take initiative and press for his country’s bests interests—two traits that were necessary in the tense political climate of the early 1800s. The tension between the Barbary nations of Northern Africa and the United States had come to a boiling point in early August of 1804, leading to a battle now known as the Second Battle of Tripoli Harbor.

With a new assortment of ships at his command, Preble had new worries. He knew the schooners accompanying him, the Vixen and Nautilus, were seaworthy, as were the two brigs Argus and Syren, which had been blockading the harbor for many weeks. But he couldn’t be so sure about the six gunboats and the two mortar boats on loan. Preble had reached an understanding to borrow these boats, along with some men to sail them, but he worried whether the flat- bottomed harbor craft could withstand the weather of the open sea.

Somehow, though, they had, and now he would put them to the test. He knew that a larger fate than his own was riding on this battle; before he had set sail for the Tripoli coast, the USS Philadelphia had been taken over by Tripoli pirates, its crew of over 300 men enslaved, and eventually rendered almost unrecognizable. The United States needed to send a message to the pirates that they weren’t going to stand for these transgressions anymore.

With the weather clear at last, Preble surveyed his enemy from the deck of the Constitution. Through his spyglass he counted 115 guns mounted on the city’s forti­fications. These cannons were supplemented by nineteen gunboats and several small corsairs, all sheltered behind the long line of rocks that, like an immense, submerged stone wall, stood between the American armada in the open sea and the protected harbor. The combined ­ repower of the American and allied ships— 132 guns and 2 mortars— was more or less equal to the Tripolitan guns, but the range of most of Preble’s short- barreled cannonades was limited. Still, Preble felt con­fident that he and his men could make “[Bashaw Yusuf Qaramanli’s] old walls rattle about his ears.” All he needed was the opportunity.

Then, at noon on August 3, Preble ­finally saw his chance to engage the enemy. He observed from his station two miles out to sea that enemy gunboats were coming out from behind the stony barrier reef, leaving them exposed in the open water. He ordered the signal hoisted: Prepare for battle.

With his entire flotilla within hearing distance of his hailing trumpet, the commodore issued his ­ final orders. The brigs and schooners, with the gunboats in tow, were to sail halfway to the stone barrier. From there the gunboats would head for the shore while the four larger ships remained in deeper waters. The bombing ships would take a position west of the town. The Constitution would follow the smaller boats toward the harbor and, on Preble’s signal, the ring would begin.

By two o’clock, the gunboats were under their own power, advancing on the harbor with sails and oars. At two- thirty, the flagship raised a blue flag, followed by a yellow and blue one, and the third and last, red and blue. This was the signal for the battle to begin, and the Constitution, followed by the brigs and schooners, sailed for the harbor.

Fifteen minutes later, the ­first mortars boomed. Rather than cannonballs, the ships’ guns launched hollow projectiles, packed with charges of gunpowder. Flying in a high arc into the city, some exploded in midair, scattering deadly shrapnel in all directions. The Tripolitans ­ fired back and the American gunboats responded in kind. The Constitution, now within a mile of Tripoli’s batteries, opened ­ fire with its long guns. The fortress batteries were silenced as the gunners took shelter from the Constitution’s broadsides, though, as the big ship sailed past, the Tripolitans resumed ­ firing.

There it was gunboat-to-gunboat and man-to-man. Within the fortress walls, the American captives could hear little beyond the rumble of guns. On the streets of Tripoli, the townspeople ran for their guns in a scene of excited disorder. At last, the bashaw was getting the full-fledged war he had seemed so keen on provoking for the last three years.

The American gunboats, although outnumbered nineteen to six, bore down on the enemy’s boats. Young Lieutenant Stephen Decatur, captaining one gunboat and accompanied by four other gunboats— the sixth lagged behind— ­ fired at two Tripolitan boats at point- blank range until they retreated behind the line of rocks that protected the inner harbor. Sailing off to ­find other prey, Decatur’s boat, followed by the gunboat commanded by his younger brother James and two other gunboats, headed for a line of ­ five Tripolitan boats moored at the mouth of the harbor’s western passage. After a round of American canister shot and musketry, those boats also pulled back into the harbor.

The little American squadron advanced next on a division of nine enemy vessels to the east. None of these fired as Decatur and his men sailed straight at them, looking to get close enough to board. The Americans wished to turn the Tripolitan tactic back upon them, leaping aboard the enemy vessels and ­ fighting hand-to-hand with pistol, saber, pike, and tomahawk. This tactic did not favor the Americans, as a typical two- dozen- man U.S. Navy crew would be met by up to ­ fifty men aboard a Tripolitan ship. But the numbers didn’t daunt Decatur: “I always thought we could lick them their own way and give them two to one.”

Not long after three o’clock, he had a chance to prove his con­fidence. The gunboats closed on the enemy, ­ firing barrage after barrage of round shot. As the Americans neared the westernmost Tripolitan vessel, the enemy ­ red their pistols but, before they could reload, the Americans clambered from gunwale to gunwale and leapt onto their decks.

Within ten bloody minutes, Decatur’s nineteen men had killed sixteen Tripolitans, wounded ­ fifteen others, and taken the remaining five prisoners. Decatur personally lowered the Tripolitan flag. Meanwhile, Lieutenant James Decatur, Stephen’s brother, aimed for the largest of the Tripolitan gunboats and softened up the enemy with intense fire. As his gunboat closed and James Decatur and his men were poised to board, the Tripolitan captain, with a large portion of his crew already dead or wounded by musket and canister ­ fire, ordered his colors struck in surrender.

By four- thirty Preble, noting a change in the wind, signaled his ships to retire from the action. Within ­ fifteen minutes, all his vessels were out of range of the Tripolitan guns.  Though another lieutenant suffered severe saber wounds, James Decatur was the only American casualty, killed by a Tripolitan captain. Just eleven men were wounded, and the man who was injured attempting to defend Decatur, Daniel Frazier, recovered from his wounds. An exact enemy casualty count was unknown, but the dead numbered at least ­ fifty, the wounded perhaps double that.

Though a good day for Preble, this had been far from an absolute victory. More than exploding mortar shells and a few dead pirates would be required to persuade the bashaw to consider peace. In April 1805, Jefferson the Navy and the Marine made an attack on the ground, as memorialized in the Marine Corps hymn: “From the Halls of Montezuma to the Shores of Tripoli, we fight our country’s battles in the air on land and sea.” By September of the same year, a treaty ending the conflict with Tripoli was made, allowing American shipping to flow freely again. More importantly, this war showed the world that the United States wasn’t just a young, weak country—it was now a major force to be reckoned with.

This holiday season, give the gift of "THOMAS JEFFERSON AND THE TRIPOLI PIRATES: The Forgotten War That Changed American History."

Reprinted from THOMAS JEFFERSON AND THE TRIPOLI PIRATES: The Forgotten War That Changed American History  by Brian Kilmeade and Don Yaeger with permission of Sentinel, an imprint of Penguin Publishing Group, a division of Penguin Random House LLC. Copyright (c) Brian Kilmeade and Don Yaeger, 2015, 2016.