The capture of an alleged al-Qaeda operative outside his home by Special Operations forces in Tripoli on Saturday and his secret removal from Libya was a rare instance of U.S. military involvement in “rendition,” the practice of grabbing terrorism suspects to face trial without an extradition proceeding and long the province of the CIA or the FBI.

U.S. officials hailed the capture of Nazih Abdul-Hamed al-Ruqai, who was wanted in connection with the 1998 bombings of the U.S. embassies in Tanzania and Kenya, as an intelligence coup that will disrupt efforts by al-Qaeda to strengthen its franchise in North Africa.

The raid in Tripoli came hours after U.S. Navy SEALs stormed a beachside compound in Somalia in a failed attempt to nab a senior militant leader from the East African country’s al-Qaeda franchise, known as al-Shabab. The two operations suggested that the Obama administration, which has been criticized for its heavy use of drone strikes against terrorism suspects, is increasingly willing to deploy ground troops, despite the risks, to seize high-value targets.

“These operations in Libya and Somalia send a strong message to the world that the United States will spare no effort to hold terrorists accountable, no matter where they hide or how long they evade justice,” Defense Secretary Chuck Hagel said in a statement. “We will continue to maintain relentless pressure on terrorist groups that threaten our people or our interests, and we will conduct direct action against them, if necessary, that is consistent with our laws and our values.”

The Libyan government on Sunday condemned what it called the “kidnapping” of one of its citizens after Ruqai, known by the alias Anas al-Libi, was forced out of his car and bundled away by men his brother described as foreign-looking “commandos.”

U.S. forces announced that they captured Nazih Abdul-Hamed al-Ruqai, known as Abu Anas al-Liby, who was indicted in 2000 in the 1998 bombings of the U.S. embassies in Kenya and Tanzania. (Handout/Getty Images)

Addressing the Libyan complaints, Secretary of State John F. Kerry called Ruqai “a key al-Qaeda figure.”

“He is a legal and an appropriate target for the U.S. military,” Kerry said, and will face trial in an American court.

Kerry, speaking Monday on the sidelines of the Asia-Pacific Economic Cooperation forum in Bali, Indonesia, gave no details about what the Libyans were told or when.

“We consult regularly with the Libyan government on a range of security and counterterrorism issues but we don’t get into the specifics of our communication with foreign governments on any kind of operation of this kind,” Kerry said.

As to the perception that the capture may mark a return to U.S. terrorism policies that were widely reviled around the world, Kerry stressed that Ruqai will be tried and is legally innocent until proven guilty.

“I hope the perception is in the world that people who commit acts of terror and who have been appropriately indicted by courts of law, by the legal process, will know that United States of America is going to do anything in its power that is legal and appropriate in order to enforce the law and to protect our security,” Kerry said.

As they celebrated Ruqai’s detention, administration officials on Sunday were largely silent on a strike, which apparently failed, by Navy SEALs on a terrorist target in Somalia. SEALs stormed the suspected hideout of an al-Shabab leader Friday night, seeking to detain a senior operative of the group.

A U.S. military official, speaking on condition of anonymity to discuss a sensitive mission, said the target of the Somali raid was Abdulkadir Mohamed Abdulkadir, a Kenyan national of Somali descent and a suspected leader of al-Shabab.

The military official said the goal of the operation was to capture Abdulkadir, but that the Navy SEAL team decided to withdraw after encountering heavy fire and concluding that it would be too difficult to take him alive. The team was also concerned that the risk of inflicting casualties on innocent bystanders had become too high.

“It was a capture mission, and when it became evident that we couldn’t capture him alive, the team decided” to withdraw, the official said. “If we wanted to kill this guy, we have lots of ways to do that.”

The operation followed last month’s brazen attack on an upscale mall in Nairobi by al-Shabab that killed dozens of people and raised concerns about the reach of a group that had appeared to be in retreat and focused on Somalia.

A former U.S. Special Operations operative familiar with Somalia policy said that the seaside town of Baraawe, where Friday’s raid took place, has become a key hub for senior al-Shabab leaders after they lost control of other areas. The group exports charcoal from the town, which represents an important source of revenue.

“It’s where the leadership hangs out,” said the official, who spoke on the condition of anonymity to describe U.S. intelligence.

U.S. officials said both operations were lawful under war powers that Congress granted the executive branch after the Sept. 11, 2001, terrorist attacks.

Officials also noted that Ruqai is on a U.N. sanctions list and has been indicted in federal court in New York. They suggested that intelligence personnel are eager to interrogate him.

Ruqai is currently being held on the USS San Antonio, an amphibious transport dock ship, in the Mediterranean Sea, according to two U.S. officials, who spoke on condition of anonymity because they were not authorized to speak about the matter.

The closest historical parallel to Ruqai’s capture, U.S. officials said, was the April 2011 detention of Ahmed Warsame, a Somali who was accused of acting as a liaison between the al-Qaeda branch in his native country and one in Yemen. Warsame, who was seized aboard a fishing vessel in the Gulf of Aden, pleaded guilty in late 2011 in federal court to providing material support to terrorist organizations.

Warsame was held secretly at sea on a U.S. Navy vessel for 40 days and questioned by an interagency interrogation unit led by the FBI before being flown to New York for arraignment.

Robert Chesney, an expert in national security law at the University of Texas, said that because Ruqai’s detention was immediately disclosed — unlike Warsame’s — the Obama administration will probably come under pressure to bring him before a judge in New York quickly.

“The longer you hold him, the trickier it gets,” Chesney said, noting that a prolonged military detention could become problematic for federal prosecutors in a civilian court.

Libya’s government said in a statement issued Sunday that it had not been consulted before U.S. troops snatched Ruqai.

“Since hearing the news, the Libyan government has been in contact with American authorities and has asked them to offer clarification,” the government said, arguing that Libyans who face terrorism charges should be tried at home.

The government noted, though, that it deems its relationship with the United States a “strategic partnership” that would not be imperiled by Saturday’s operation.

Since the 2011 civil war that toppled the regime of Moammar Gaddafi, Libya has been wracked by lawlessness, growing extremism and sporadic outbreaks of violence between rival militias. The country’s newly elected government wields little authority across the oil-rich country, where militias established during the conflict continue to hold the bulk of weapons and power.

Even Libya’s military leaders, who have received counterterrorism training and funding from the United States, expressed surprise at an operation that was, in some respects, reminiscent of the CIA’s rendition of terrorism suspects during the years that followed the Sept. 11, 2001, attacks.

“We found out from media outlets just like everybody else,” said Aly Sheikhi, a spokesman for the Libyan armed forces chief of staff. He said he had no additional information about the incident.

Unlike former CIA captives, however, Ruqai will be brought before a federal criminal court relatively quickly and will not be held incommunicado indefinitely or turned over to a third country for interrogation, a policy know as “extraordinary rendition.”

After he assumed office, President Obama barred the use of extraordinary rendition but reserved the right to capture and render some suspects for trial in the United States.

A U.S. official declined to say whether the Libyan government had been notified in advance of Saturday’s operation, but the official added that Washington considers the new government in Tripoli “a partner in the fight against al-Qaeda.”

The official, who spoke on the condition of anonymity to discuss a covert operation, said that Ruqai’s capture is seen as a significant victory because he was thought to be pivotal to the resurgence of al-Qaeda’s North Africa branch. The official would not say whether Ruqai was transported out of Libya by sea or air. He also declined to say where Ruqai is being held or when he might be arraigned in federal court.

“We’re interested in what he has been doing since those times,” said the official, referring to the 1998 attack. “There are concerns that he has attempted to grow al-Qaeda’s capabilities in North Africa.”

The reemergence of Libya-based jihadists intent on striking Western targets has been a top U.S. intelligence priority since the Sept. 11, 2012, attack on American government installations in the eastern city of Benghazi.

Craig Whitlock and Rajiv Chandrasekaran in Washington, Abigail Hauslohner and Lara El Gibaly in Cairo, and Anne Gearan in Bali, Indonesia, contributed to this report.