The fledgling United States Marine Corps proved its dauntless courage with a "miracle" victory in the Battle of Derna on the shores of Tripoli in North Africa on this day in history, April 27, 1805.
The successful attack against overwhelming numbers on the port city in present-day Libya, a stronghold of pirates who spent years attacking United States ships at sea, was the climactic battle of the First Barbary War (1801-05).
The victory is immortalized in a patriotic American anthem.
"From the Halls of Montezuma/To the Shores of Tripoli/We fight our country's battles/In the air, on land and sea," proclaims the rousing opening lyrics of "The Marines' Hymn" (the original 19th-century opening line, pre-air power, was "on the land as on the sea").
Writes the Office of the Historian of the U.S. Department of State, "Prior to independence, American colonists had enjoyed the protection of the British Navy."
"However, once the United States declared independence, British diplomats were quick to inform the Barbary States that U.S. ships were open to attack."
The pirates demanded tribute from foreign nations for safe passage through the Mediterranean.
American ships became a common target, inciting anger among U.S. citizens.
"From the Halls of Montezuma/To the Shores of Tripoli/We fight our country's battles on the air, on land and sea." — "The Marines' Hymn"
President Thomas Jefferson sent a fleet to the Mediterranean to combat the pirates in 1801.
Among other indignities, 297 crewmen of the U.S. frigate Philadelphia were captured and taken prisoner after the ship ran aground off Tripoli in 1803.
The Battle of Derna ended with Marines raising the American flag over a captured foreign stronghold for the first time in their history — an act of resolve for which the Corps would later be immortalized in a famous photograph during the Battle of Iwo Jima in World War II.
The victory at Derna forced Barbary pirate leaders to the negotiation table, ending the war two months later with the Treaty of Tripoli.
The battle followed one of the most incredible efforts in the history of American warfare.
Marine Corps Lt. Presley O'Bannon, joined by former Army captain and consul William Eaton, led a small band of Marines and an international mercenary force on a 400-mile march from Alexandria, Egypt, to attack the pirate port.
They were "able to assemble a mixed force of some 400 men, composed of 38 Greek mercenaries, 25 mostly European artillerists, 90 men … 190 camels and their drivers, a small force of Arab cavalry, and eight U.S. Marines," writes the Naval History and Heritage Command in its official report of the battle.
"This force began its march in Egypt on March 8, 1805, and after six weeks of mutiny, hunger, thirst, Arab intransigence and religious tension, arrived on April 25 before Derna, the easternmost fortified town under Tripolitan control."
MEET THE AMERICAN WHO FIRST COMMANDED THE MARINES: REVOLUTIONARY WAR HERO SAMUEL NICHOLAS
The march "with a mercenary army that continued to have serious threats of mutiny, lack of food, and no water was a miracle itself," Kater Miller, a curator for the National Museum of the Marine Corps in Virginia, told Fox News Digital.
Another incredible feat followed.
The 400-mile march "with a mercenary army that continued to have serious threats of mutiny, lack of food, and no water was a miracle itself." — Marine Corps historian Kater Miller
Derna was defended by a much larger force of 945 cavalry and 1,250 foot soldiers. But the Marine-led assault enjoyed the support of U.S. Navy warships offshore, in one of the first joint-force attacks in U.S. military history.
"Eaton … called on Governor Mustapha Bey to surrender, a summons that was contemptuously rejected," states the Naval History and Heritage Command.
"Assaulting a fortified coastal city, with a handful of Marines, bolstered by a mercenary army against numerically superior defenders was a tremendous gamble," said Miller.
The high-stakes gamble yielded big rewards.
CLICK HERE TO SIGN UP FOR OUR LIFESTYLE NEWSLETTER
The attack deposed longtime Tripolitania dynastic leader Yusuf Karamanliand and led to the Treaty of Tripoli in June.
Among other outcomes, the crew of the Philadelphia was released.
The attack also earned praise for the Marines from Karamanliand's own brother.
"Lieutenant Presley O’ Bannon, commanding the Marines, performed so heroically in the battle that Hamet Karamanli presented him with an elaborately designed sword that now serves as the pattern for the swords carried by Marine officers," Miller said.
The sword is housed at the National Museum of the Marine Corps in Virginia today.
CLICK HERE TO GET THE FOX NEWS APP
"The Navy-Marine Corps team worked together to achieve their objective for the first time since the Corps' reconstitution (in 1798)," said Miller.
"The assault was successful because of intrepid leadership, U.S. Navy support, and tenacity."
For more Lifestyle articles, visit www.foxnews.com/lifestyle.