* Libyan wanted for 1998 embassy bombings seized in Tripoli
* Somali port raid on al Shabaab fails to take target
* Kerry: "Terrorist organisations can run but they can't hide"
By Mark Hosenball and Ghaith Shennib
WASHINGTON/TRIPOLI, Oct 6 (Reuters) - After U.S. raids in Libya and Somalia that captured an Islamist wanted for bombing U.S. embassies in Africa 15 years ago, Secretary of State John Kerry warned al Qaeda they "can run but they can't hide".
Nazih al-Ragye, better known by the cover name Abu Anas al-Liby, was seized by U.S. forces in the Libyan capital Tripoli on Saturday, the Pentagon said. A raid on the Somali port of Barawe, a stronghold of the al Shabaab movement behind last month's attack on a Kenyan mall, failed to take its target.
"We hope this makes clear that the United States of America will never stop in its effort to hold those accountable who conduct acts of terror," Kerry said on Sunday in Indonesia, ahead of an Asia-Pacific summit.
"Those members of al Qaeda and other terrorist organisations literally can run but they can't hide," Kerry said in Benoa on Bali. "We will continue to try to bring people to justice."
Liby, a Libyan believed to be 49, has been under U.S. indictment for his alleged role in the bombings of the U.S. embassies in Kenya and Tanzania in 1998, which 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 programme.
"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 was arrested at dawn in Tripoli as he was heading home after morning prayers, a neighbour and Libyan 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 neighbours, who did not give his name. "They kidnapped him. We do not know who are they."
Two Islamist militia sources confirmed the incident.
A year ago, CNN quoted Western intelligence sources as saying Liby had returned to his native country during the Western-backed uprising that ousted Muammar Gaddafi.
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.
Local people in Barawe and Somali security officials said troops came ashore from the Indian Ocean to attack a house near the shore used by al Shabaab fighters.
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.
A Somali intelligence official said the target of the raid at Barawe, about 110 miles (180 km) south of Mogadishu, was a Chechen commander, who had been wounded and his guard killed. Police said a total of seven people were killed.
Sheikh Abdiasis Abu Musab, spokesman for al Shabaab's military operations, told Reuters foreign forces had landed on the beach at Barawe and launched an assault at dawn that drew gunfire from rebel fighters in one of the militia's coastal bases.
Britain and Turkey denied his suggestion that their forces had been involved in the attack and taken casualties.
Abu Musab said the attackers appeared to use silenced weapons. Al Shabaab responded with gunfire and grenades.
The New York Times quoted an unnamed U.S. security official as saying that the Barawe raid was planned a week and a half ago in response to the al Shabaab assault on a Nairobi shopping mall last month in which at least 67 people died.
"It was prompted by the Westgate attack," the official said.
Barawe residents said fighting erupted at about 3 a.m. on Saturday (midnight GMT).
"We were awoken by heavy gunfire last night, we thought an al Shabaab base at the beach was captured," Sumira Nur told Reuters from Barawe by telephone. "We also heard sounds of shells, but we do not know where they landed," she added.
The New York Times quoted a Somali government official as saying that the government "was pre-informed about the attack".
In 2009, helicopter-borne U.S. special forces killed senior al Qaeda militant Saleh Ali Saleh Nabhan in a raid in southern Somalia. Nabhan was suspected of building the bomb that killed 15 people at an Israeli-owned hotel on the Kenyan coast in 2002.
The United States has used drones to kill fighters in Somalia in the past. In January 2012, members of the elite U.S. Navy SEALs rescued two aid workers after killing their nine kidnappers.
Shabaab leader Ahmed Godane, also known as Mukhtar Abu al-Zubayr, has described the Nairobi mall attack as retaliation for Kenya's incursion in October 2011 into southern Somalia to crush the insurgents. It has raised concern in the West over the operations of Shabaab in the region.