In transferring a Somali terrorism suspect to federal court after two months of interrogation aboard a U.S. Navy ship, the Obama administration is crafting a detention policy that blends civilian and military options for handling captured foreign militants.

Administration officials insisted that in this case, the federal criminal code offered a better way to charge the suspect than laws enforced by a military commission. But the Somali’s secret transfer to New York also appeared to challenge Congress, where lawmakers are attempting to prevent just that option.

Ahmed Adulkadir Warsame, an alleged liaison between two al-Qaeda affiliates — Somalia-based al-Shabab and Yemen-based al-Qaeda in the Arabian Peninsula, or AQAP — was captured on a boat in the Gulf of Aden in April and held on a U.S. Navy ship for interrogation until he was flown to the United States this week for prosecution in civilian court.

“Wherever possible, our first priority is and always has been to apprehend terrorist suspects and to preserve the opportunity to elicit valuable intelligence that can help us protect the American people,” White House spokesman Jay Carney said Wednesday. “In this case, the government . . . has been able to acquire very valuable intelligence from this operation.”

A U.S. official described Warsame as a “senior commander for al-Shabab” and said there was “strong reason to believe” that he was in contact with U.S.-born Anwar al-Aulaqi, a top AQAP figure, during extended time that Warsame spent in Yemen. Officials said that Warsame had been mentioned in several intercepted communications between the two groups and that the Yemenis welcomed his presence in their country as both a trainer and trainee in firearms and explosives.

The administration’s marriage of two systems in the case — relatively unimpeded military detention followed by a traditional criminal prosecution — immediately drew fire from Republicans and the civil liberties community.

Backed by significant numbers of Democrats on Capitol Hill, Republicans are pressing legislation that would essentially compel the administration to transfer all terrorism suspects captured by the United States to Guantanamo Bay, Cuba, for indefinite detention or trial by military commission.

“It’s astonishing that this administration is determined to give foreign fighters all the rights and privileges of U.S. citizens regardless of where they are captured,” said Senate Minority Leader Mitch McConnell (R-Ky.). “It is not necessary to bring or continue to harbor these terrorists within the United States. The infrastructure is already in place to handle these dangerous individuals at Guantanamo.”

Rep. Mike Rogers (R-Mich.), chairman of the House intelligence committee, suggested that federal prosecution was a “default” mechanism for lack of better options, given the administration’s opposition to placing newly captured suspects in Guantanamo.

“The last few years of ‘lawfare’ over detainees have created bureaucratic risk aversion that often forces us to work through other countries, which is rarely optimal, or, in this case, a U.S. Navy ship at sea, which is also a less than ideal arrangement,” Rogers said.

For the American Civil Liberties Union and Amnesty International, which have long opposed the use of Guantanamo Bay and military commissions, the decision to transfer Warsame to New York was correct. But the organizations, in separate statements, criticized the Somali’s extended detention aboard a military vessel, where he was subjected to almost-daily questioning without a lawyer.

Warsame was only read a Miranda warning and advised of his right to an attorney, which he waived, when questioning ended by a High-Value Detainee Interrogation Group, composed of military and intelligence and law enforcement officials. FBI agents then took over in anticipation of a criminal case in the United States.

“Warsame was not detained on a battlefield, nor was he captured during combat. He should have been handed over to law enforcement officials at the earliest opportunity, not held as a military prisoner,” said Tom Parker, a policy director for Amnesty International. “Warsame’s detention on board a U.S. naval vessel has unfortunate echoes of the [George W.] Bush administration’s practice of using U.S. Navy ships as black sites in which to hold ghost detainees. That fact alone will inevitably cast a long shadow over this case.

The Obama administration, however, said it could detain suspected allies of al-Qaeda legally and humanely while preserving the ability to prosecute them in federal court at some later date.

The International Committee of the Red Cross was notified of Warsame’s capture in early May and was allowed to see him on the ship in June. Officials said a man captured alongside Warsame was ultimately transferred into the custody of local authorities in Puntland, a self-governing region in northwest Somalia directly across the Gulf of Aden from Yemen.

Some human rights activists welcomed the involvement of the ICRC.

“If the ICRC was notified and given access, then this was not the kind of secret detention or disappearance that the Bush administration engaged in, and Obama’s executive order requiring such access was respected,” said Tom Malinowski, head of the Washington office of Human Rights Watch.

Warsame, thought to be in his 20s, is charged in a nine-count indictment with providing material support to al-Shabab, a militant Islamist group fighting the U.S.-backed government in Somalia, and AQAP, which has plotted terrorist attacks against the United States. Warsame was also charged with weapons offenses and conspiracy.

Richard H. Pildes, a professor of constitutional law at New York University, said that the weapons charge has no equivalent in the military system, and that it is unclear whether material support, as charged in the military system, will survive ongoing appeals that it is not a war crime.

“One of the more interesting aspects of this case is that more substantive charges can be brought in the criminal courts,” Pildes said. “The value of a hybrid model is that if it can be done legitimately, the government can pursue its legitimate intelligence-gathering needs while also pursuing criminal prosecution, and you avoid pitting one against the other.”

Staff writers Roz Helderman, Greg Miller, Felicia Sonmez and staff researcher Julie Tate contributed to this report.