Updated

Secretary of State John Kerry said Sunday that a pair of raids conducted in Africa by American special forces signaled the ongoing determination of the United States to bring terrorists to justice and sent the message that "members of Al Qaeda and other terrorist organizations literally can run but they can't hide."

The Pentagon confirmed Saturday night that U.S. special forces had captured alive Abu Anas al Libi in Tripoli, Libya. Libi, also known as Nazih Abdul-Hamed al-Ruqai, was wanted in connection with the 1998 bombings of the American embassies in Kenya and Tanzania. The operation was carried out by the Delta Force, a U.S. official told Fox News on Sunday.

The other Africa operation targeted a commander in Al Shabaab, the militant group in Somalia linked to last month’s Kenya mall attack that killed more than 60 people. The Navy SEALS involved in that raid were members of SEAL Team Six, the same unit that killed in Laden in his Pakistan hideout in 2011, the U.S. official said.

"On October 5, the Department of Defense, acting under military authorities, conducted an operation to apprehend longtime Al Qaeda member Abu Anas al Libi in Libya," Pentagon Press Secretary George Little said in a statement. "He is currently lawfully detained under the law of war in a secure location outside of Libia. Abu Anas al Libi has been indicted in the Southern District of New York in connection with his alleged role in Al Qaeda's conspiracy to kill U.S. nationals and to conduct attacks against U.S. interests worldwide, which included Al Qaeda plots to attack U.S. forces stationed in Saudi Arabia, Yemen, and Somalia, as well as the U.S. embassies in Dar es Salaam, Tanzania, and Nairobi, Kenya."

Multiple senior U.S. officials told Fox News that Libi is being held on a ship at sea.

More On This...

    "Libi could be held at sea for a matter of weeks before he is turned over to law enforcement authorities," one senior U.S. official told Fox News.

    Speaking Sunday at an economic conference in Bali, Indonesia, Kerry praised the "quality and courage" of the forces involved in the two actions and vowed that the United States "will never stop in the effort to hold those accountable who conduct acts of terror" and would "continue to try to bring people to justice in an appropriate way with hopes that ultimately these kinds of activities against everybody in the world will stop."

    Sources told Fox News that Libi will be read his rights by an elite FBI unit that was sent out for that purpose. US officials say that the Justice Department plans to prosecute him in a U.S. court.

    Al Libi is on the FBI's most-wanted list with a $5 million bounty on his head. He was indicted by a federal court in the Southern District of New York, for his alleged role in the bombings of the United States Embassies in Dar es Salaam, Tanzania, and Nairobi, Kenya, on August 7, 1998, that killed more than 220 people.

    He is believed to have spent time in Sudan where Usama bin Laden was based in the early 1990s. After bin Laden was forced to leave Sudan, al Libi turned up in Britain in 1995 where he was granted political asylum in Britain under unclear circumstances and lived in Manchester. He apparently fled Britain in 2000 when his name was added to the FBI's most wanted list.

    Libya asked the U.S. on Sunday for "clarifications" regarding the raid and said any Libyan should face trial in his own country.

    The raid puts the fragile Libyan government in a delicate position — the country's post-Qaddafi leadership faces criticism from some Libyans that it is too close to the United States, and it cannot be seen to be allowing U.S. forces to act freely on Libyan territory. The central government has had only limited authority around the country, where militiamen — many of the Islamic militants themselves — hold considerable power and have unleashed their anger on the government in the past.

    The country's turmoil has allowed Al Qaeda and other militant groups to increase their activity here. On Sept. 11, 2011, militants attacked the U.S. consulate in Benghazi, Libya's second largest city, killing the American ambassador and three other Americans, an attack that demonstration the power of militias and the weakness of the government.

    Al-Libi was believed to be a computer specialist with Al Qaeda. He studied electronic and nuclear engineering, graduating from Tripoli University, and was an anti-Qaddafi activist.

    In the Somalia raid, the strike on Al Shabaab was carried out in the early hours before morning prayers in the seaside town of Barawe.

    A resident said by telephone that heavy gunfire woke up residents before dawn prayers. The raid was carried out by US Navy SEALs, who came ashore and killed at least one individual at a villa.

    The target of the operation was Abdikadir 'Ikrima' Mohammed, a Kenyan of Somali origin that is a foreign fighter commander for al-Shabaab in Somalia, Fox News confirms.

    According to Fox News sources, a shootout ensued when SEALs entered the Somali villa, with the SEALs subsequently unable to bring the body of one of the militants killed back with them. A senior U.S. official told Fox News that no U.S. personnel were injured in the operation, but one militant was killed.

    The team ran into fiercer resistance than expected and the unit's leader decided to abort the mission and the Americans swam away, U.S officials told The Associated Press.

    The leader of Al Shabaab, Mukhtar Abu Zubeyr, also known as Ahmed Godane, has claimed responsibility for the shopping mall attack in Nairobi.

    Little confirmed the raid earlier Saturday, saying: "I can confirm that yesterday, October 4, U.S. military personnel were involved in a counter terrorism operation against a known Al Shabaab terrorist.  We are not prepared to provide additional detail at this time."

    Foreign militaries -- often the U.S. but not always -- have carried out several strikes inside Somalia in recent years against Al Shabaab or Al Qaeda leaders, as well as criminal kidnappers.

    Fox News’ Jennifer Griffin, Justin Fishel and the Associated Press contributed to this report.