Battle of Derne The Battle of Derne was the decisive victory of a mercenary army led by a detachment of United States Marines and soldiers against the forces of Tripoli during the First Barbary War . It was the first recorded land battle of the United States fought overseas . Background . In 1804 , the former Consul to Tunis , William Eaton , returned to the Mediterranean with the title of " Naval Agent to the Barbary States " . Eaton had been granted permission from the United States government to back the claim of Hamet Karamanli . Hamet Karamanli was the rightful heir to the throne of Tripoli and had been deposed by his brother Yussif Karamanli . Upon his return to the area , Eaton sought out Hamet Karamanli who was in exile in Egypt . Upon locating him , Eaton made a proposal to reinstate him on the throne . The exile agreed to Eaton ' s plan . Commodore Samuel Barron , the new naval commander in the Mediterranean , provided Eaton with naval support from the USS " Nautilus " , the USS " Hornet " and the USS " Argus " . The three vessels were to provide offshore bombardment support . The " Nautilus " was commanded by Oliver Hazard Perry , the " Hornet " was commanded by Samuel Evans , and the " Argus " was commanded by Isaac Hull . A detachment of U . S . Marines was given to Eaton under the command of First Lieutenant Presley O ’ Bannon . Eaton and Hull made their base of operations at Alexandria , Egypt . There , with the help of Hamet Karamanli , they recruited about 500 Arab and Greek mercenaries . Eaton named himself general and commander - in - chief of the combined force . On March 6 , 1805 , General Eaton began to lead his army on a trek across the Libyan desert . Their objective was the port city of Derne , the capital of the province of Cyrenaica . Supplies and money were promised to the largely mercenary force when they reached the city . During the 50 - day trek , Eaton became concerned with the relationship between the Christians and the roughly 200 or 300 Muslim mercenaries in his force . On several occasions mutiny threatened the success of the expedition . Between March 10 and March 18 , several of the Arab camel drivers mutinied before reaching the sanctuary of the Massouah Castle . From March 22 to March 30 , there were mutinies of several of the Arab mercenaries under the command of Sheik el Tahib . On April 8 , upon crossing the border from Egypt into Libya Tripoli , General Eaton had quelled the Arab mutinies . The force finally reached the port city of Bomba in late April , up the coast from Derne , where the " Argus " , the " Nautilus " and the " Hornet " along with Captain Hull were waiting . There Eaton and his force received supplies and money to pay the mercenaries . Battle . On the morning of April 26 , Eaton sent a letter to the governor of Derne , Mustafa Bey , asking for passage through the city and supplies , though Eaton likely knew that these were terms that the governor could not accept . Mustafa reportedly wrote back , " my head or yours ! " . On the morning of April 27 , Eaton observed a fort in Derne with eight guns , and he believed that the majority of the population would be in favor of Hamet . The " Argus " sent a cannon ashore for use in the attack . Hull ' s ships opened fire and bombed Derne ' s batteries for about an hour . General Eaton divided his army into two separate attacks . Hamet would lead the Arabs southwest to cut off the road to Tripoli and then attack the left flank of the city and storm the more weakly defended governor ' s palace ; meanwhile Eaton with the rest of the mercenaries and Marines attacked the harbor fortress , while Hull and the other ships opened fire on the heavily defended port batteries . At 2 : 45 p . m . the attack began with Lt . O ' Bannon and the Marines in the lead . O ' Bannon led the Marines and 50 Greek cannoneers with the field piece from the " Argus " , though after about 45 minutes the gun ' s effectiveness was decreased after the crew left the ramrod in the tube and shot it away . The harbor defenses had been reinforced and the attackers were momentarily halted ; this however allowed the Arab mercenaries sent to cut the road to Tripoli to ride unopposed into the western section of the city . Eaton saw his mercenary army in confusion from the enemy ' s musket fire , and that a charge would be the only way to continue the attack . At this time he was seriously wounded in the wrist by a musketball . From the " Argus " , Hull observed the Americans and mercenaries " gaining ground very fast though a heavy fire of Musquetry [ sic ] was constantly kept upon them " . The ships cut their fires during the charge . Eaton reported that O ' Bannon and his Marines and Greeks " pass ' d through a shower of Musketry from the Walls of houses , took possession of the Battery " . The defenders fled in such haste that they left their cannon loaded and ready to fire . O ' Bannon raised the American flag over the works as Eaton turned the captured batteries on the city and opened fire . Hamet ' s force in the meantime had seized the governor ' s palace and secured the western part of the town . Many of the defenders of the harbor fortress continued retreating through the town and right into Hamet ' s force . By 4 : 00 p . m . the entire city had fallen . For the first time , an American flag was flown over fortifications on that side of the Atlantic Ocean . Yusuf was aware of the attack on Derne and had sent reinforcements to the city . By the time this force arrived , the city had fallen . Still they dug in and prepared to retake the city . Eaton immediately worked on fortifying his new position . Hamet had taken up residence in the governor ' s palace and his Arab forces patrolled the outlying areas of the city . The reinforcements dug in south of the city and waited . On May 13 , they attacked the city and drove the Arabs back , almost capturing the governor ' s palace . The " Argus " and Eaton ' s captured batteries pounded the attackers , who fled under continued bombardment . By nightfall , both sides were back to their original positions . Skirmishes and several other minor attempts were made on the city in the following weeks , but the city remained in American control . From Derne , Eaton now planned to march across the desert and attack Tripoli from the land . During his march he was informed of the treaty signed between Tobias Lear and Yusuf Karamanli . In the middle of his trek Eaton was ordered to return to Egypt with Hamet . Aftermath . The Battle of Derne was the first recorded land battle of the United States on foreign soil after the American Revolutionary War . The battle was the decisive action of the First Barbary War , although Eaton was angered by what he called a ' sell - out ' between Consul Lear and the bey . Hamet returned to Egypt and the mercenaries were never fully paid . William Eaton returned to the United States as a national hero . First Lt . O ' Bannon was presented a Mameluke sword by Hamet , the Ottoman Empire viceroy , on December 8 , 1805 , as a gesture of respect and praise for the Marines ' actions and later was awarded a sword of honor patterned on the Mameluke design , by his home state of Virginia ( which led to adoption of the sword by all U . S . Marine officers to this day ) . The attack on the city was the inspiration for a portion of the lyrics of the Marines ' Hymn that mention " " to the shores of Tripoli " " .