The Pentagon said senior al Qaeda figure Anas al Liby was seized in the raid in Libya, but a U.S. official said the raid on the Somali town of Barawe failed to capture or kill the intended target from the al Qaeda-linked al Shabaab movement.
Liby, believed to be 49, has been under U.S. indictment for his alleged role in the East Africa embassy bombings that killed 224 people.
The U.S. government has also been offering a $5 million reward for information leading to his capture, under the State Department's Rewards for Justice program.
"As the result of a U.S. counterterrorism operation, Abu Anas al Liby is currently lawfully detained by the U.S. military in a secure location outside of Libya," Pentagon spokesman George Little said without elaborating.
Liby, also known as Nazih al-Ragye, was arrested at dawn in the Libyan capital, Tripoli, as he was heading home after morning prayers, a neighbor and militia sources said.
"As I was opening my house door, I saw a group of cars coming quickly from the direction of the house where al-Ragye lives. I was shocked by this movement in the early morning," said one of his neighbors, who did not give his name, "They kidnapped him. We do not know who are they."
Two Islamist militia sources confirmed the incident.
CNN reported in September last year that Liby had been seen Tripoli. It quoted Western intelligence sources as saying there was concern that he may have been tasked with establishing an al Qaeda network in Libya.
That CNN report quoted counterterrorism analysts as saying that Liby may not have been apprehended then because of the delicate security situation in much of the country, where former jihadists hold sway. It quoted one intelligence source as saying that Liby appeared to have arrived in Libya in the spring of 2011, during the country's civil war.
The Pentagon confirmed U.S. military personnel had been involved in an operation against what it called "a known al Shabaab terrorist," in Somalia, but gave no more details.
One U.S. official, speaking to Reuters on condition of anonymity, said the al Shabaab leader targeted in the operation was neither captured nor killed.
U.S. officials did not identify the target. They said U.S. forces, trying to avoid civilian casualties, disengaged after inflicting some al Shabaab casualties. They said no U.S. personnel were wounded or killed in the operation, which one U.S. source said was carried out by a Navy SEAL team.