The attack on Derna (Wikimedia Commons)

My colleagues at The Washington Post broke the story yesterday of the U.S.'s capture of prominent Libyan jihadist Ahmed Abu Khattala in a raid in Benghazi over the weekend. Abu Khattala is linked with the infamous assault on the U.S. consulate in Benghazi on Sept. 11, 2012, which led to deaths of four Americans.

The raid exposed the weakness of Libya's fledgling government and its inability to get tough on a whole constellation of armed militias and extremist groups now operating on Libyan soil. But this is hardly the first time U.S. special forces have opeated in Libya, a country where the United States has a curious and long history of stealth missions, punctuated sometimes by a bit of derring-do.

The burning of the USS Philadelphia, 1804
The U.S.'s first foreign conflict was what's now known as the Barbary Wars, sparked initially by President Thomas Jefferson's refusal to pay more tribute to the rulers of coastal kingdoms in North Africa that preyed on European shipping. "The least considerable of the Barbary States"--as Jefferson put it, accusing the city-states of avarice--was Tripoli (now the capital of modern-day Libya). In 1803, the impressive, new frigate USS Philadelphia got marooned in Tripoli's harbor and captured, along with its battery of cannon, by the city's forces.

It seemed clear to the Americans in a flotilla nearby that the ship could not be reclaimed in the shadow of Tripoli's defenses, but at least it could be destroyed. Under the command of Lt. Stephen Decatur, who became one of the first war heroes of the American republic, a small contingent of U.S. troops rowed under the cover of darkness into the harbor in a vessel kitted out to look like a common trader. They tricked the Tripolitan soldiers aboard the USS Philadelphia to let them tie their vessel to the frigate and then swiftly clambered aboard, slew the enemies there and set the ship and its guns aflame. The famed British admiral Horatio Nelson called it "the most bold and daring act of the age." Not for nothing does the Marines' Hymn celebrate feats on "the shores of Tripoli."

The battle of Derna, 1805
In one of the more dramatic clashes of these wars, an expedition of U.S. forces, accompanied by a rival claimant to Tripoli's throne, left Egypt in early March 1805 and arrived at Derna (also known as Darnah), a coastal city east of Benghazi. The U.S. navy official records describe the motley crew that gathered for the strike:

[It was] a mixed force of some 400 men, composed of 38 Greek mercenaries, 25 mostly European artillerists, 90 men serving under [the Tripolitan pretender to the throne] directly, 190 camels and their drivers, a small force of Arab cavalry, and eight US Marines... This force began its march in Egypt on 8 March 1805, and after six weeks of mutiny, hunger, thirst, Arab intransigence and religious tension arrived on 25 April before Derna, the eastern-most fortified town under Tripolitan control.

The U.S. contingent, with the aid of ships pounding Derna's defenses from sea, captured the city and withstood Tripolitan counterattacks until word came that a peace deal between the two sides had already been struck. It was the first time U.S. soldiers raised their flag on foreign soil. The Tripolitan pretender had to return to Egypt, while the Americans and Europeans boarded their ships and departed. "The remainder of the Arab force [in U.S. employ]," recounts the U.S. Navy department's record, "was left to its fate."

Operation El Dorado Canyon, 1986
After a bomb explosion in a Berlin discotheque injured dozens of U.S. military personnel, Washington chose to take action against the regime implicated in the attack: the dictatorship of Libya's Moammar Gaddafi.  The air raid, dubbed Operation El Dorado Canyon, struck at key Libyan military installations, including the barracks where Gaddafi stayed with his family. Gaddafi escaped the attack, but some 40 other Libyans perished. One U.S. plane was shot down and two airmen aboard died. Gaddafi built a monument to Libya's defiance (and presumably his survival) in his compound.

U.S. air strikes would be instrumental 25 years later in the NATO bombing campaign that helped rebel forces ultimately overthrow Gaddafi's regime.

The capture of Anas al-Libi2013
The predecessor to this weekend's operation was the U.S. abduction of Nazih Abdul-Hamed al-Ruqai, also known as Anas al-Libi, a Libyan militant wanted in connection with the 1998 al-Qaeda-linked bombings of the U.S. embassies in East Africa, which killed more than 200 people. He was seized in a joint operation last October by the CIA, FBI and the U.S. Army's elite Delta Force. Earlier this year, the Post obtained footage of Ruqai's capture in Benghazi.