In Libya, US forces seized a militant known as Abu Anas al-Libi, a long-sought Al-Qaeda operative indicted in the 1998 bombings of US embassies in Kenya and Tanzania.
A separate raid in the southern Somali port of Barawe failed to capture the senior militant and it was unclear whether he had been killed, but a US official said several Shebab members were killed.
The Libya operation, however, appeared to be a success for the US military.
"As the result of a US counterterrorism operation, Abu Anas al-Libi is currently lawfully detained by the US military in a secure location outside of Libya," Pentagon spokesman George Little said in a statement.
A source close to Libi told AFP he was snatched by armed men in Tripoli.
Libi, who was on the FBI's most wanted list with a $5 million reward, was indicted in US federal court in New York for allegedly playing a key role in the east Africa bombings.
The attacks left more than 200 people dead.
His capture ended a 15-year manhunt for a key Al-Qaeda operative, who was born under the name Nazih Abdul Hamed Al-Raghie.
It also paved the way for Libi, 49, to be brought to the United States to face trial.
"Capture of Abu Anas al Libi would represent major blow against remnants of al Qaeda's core," Democratic Representative Adam Schiff, who serves on the House Intelligence Committee, wrote on Twitter.
The operation took place in broad daylight with the knowledge of the Libyan government, a US official told CNN.
Libyan security services denied the claim, saying they were unaware of any kidnapping or arrest of the man.
According to the indictment, Libi and other Al-Qaeda members discussed an attack on the US Embassy in Nairobi as early as 1993.
He is said to have conducted visual and photographic surveillance of the mission that year.
In 1994, he allegedly planned to attack the mission as well as the building, then housing the United States Agency for International Development in the Kenyan capital, along with British, French and Israeli targets.
A US official said the operation in Somalia sought to capture a "high-value" Shebab leader, and that no US personnel were injured or killed.
The operation marked the most significant US assault in Somalia since commandos killed key Al-Qaeda operative Saleh Ali Saleh Nabhan in the same area four years ago.
It followed an attack by Shebab gunmen last month on the upscale Westgate shopping mall in Nairobi that left 67 people dead during a four-day siege.
"US personnel took all necessary precautions to avoid civilian casualties in this operation and disengaged after inflicting some Shebab casualties," the official said.
Declining to identify the people who died, the official said that "even in these extreme operational circumstances, the US military is very cautious to minimize civilian casualties."
The statement was an acknowledgement of US authorities' concern with the bitter anti-American sentiment fueled by civilian casualties in US military operations.
The Al-Qaeda-linked Shebab had earlier claimed it was British and Turkish special forces that staged a nighttime sea and air attack on one of its bases, but Britain denied any involvement.
Insurgent leaders in Barawe, one of the few ports left in Shebab hands, said commandos rappelled from a helicopter and tried to storm a house belonging to a senior Shebab commander, but the assault failed.
The SEAL team approached and fired on the unidentified target's seaside villa by sea, according to The New York Times.
Although the Shebab leader was believed to have been killed during the pre-planned assault, the SEALs had to withdraw before they could confirm the kill, a senior US official told the newspaper.
"The Barawe raid was planned a week and a half ago," a US security official told the Times.
"It was prompted by the Westgate attack."
A senior Somali government official told the newspaper that "the attack was carried out by the American forces and the Somali government was pre-informed about the attack."
Shebab spokesman Abdulaziz Abu Musab told AFP that commandos had stormed the beach by boat, but laid blamed on Britain and Turkey.
"The bungled operation was carried out by white people, who came with two small boats from a larger ship out at sea... one Shebab guard was killed, but reinforcements soon came and the foreigners fled," he said.
"Where the foreigners had been, afterwards we saw lots of blood, so maybe we wounded some."