A member of an Al Qaeda-linked group was interrogated for two months by U.S. authorities on the Navy amphibious assault ship USS Boxer in the waters off the Horn of Africa, before being flown to the United States over the July 4 holiday to face prosecution in a civilian court, officials say.

The move, first reported by Fox News, offers a glimpse into how the U.S. government may handle foreign terror suspects captured overseas in the wake of the Justice Department's failed attempt to prosecute the alleged conspirators of the Sept. 11, 2001, attacks in a civilian court in New York City. Congress has blocked administration efforts to close the detention facility at Guantanamo Bay, Cuba, and many believe military interrogation is the most effective way to obtain valuable intelligence.

Ahmed Abdulkadir Warsame, in his mid-twenties, was interrogated "extensively" and for "some time" by military personnel, and he provided useful intelligence, according to one source. He was advised of his Miranda rights at the time, according to an administration official, but U.S. law enforcement were ultimately able to interview him, and he continued to offer useful information, according to administration officials.

The news already has sparked outrage on Capitol Hill.

“While Americans across the nation celebrated our independence, the Obama administration transferred a foreign terrorist intent on destroying America’s freedoms into the U.S. to be tried in civilian court," said Rep. Lamar Smith, R-Texas, chairman of the House Judiciary Committee. "The Obama administration won’t detain terrorists at a military facility in Guantanamo Bay, but they have no problem with a naval ship off the coast of Africa. Their policy toward detainees lacks common sense."

Smith and other Republicans have long argued that foreign terror suspects should be tried in military commissions rather than civilian courts.

On April 19, U.S. military forces launched an operation in the Horn of Africa region, possibly in Yemen, and captured Warsame, a Somali citizen with ties to al-Shabab, which has been waging a bloody battle against the fledgling government in Somalia and has recruited dozens of Americans to join its ranks. One administration official described Warsame as an "important figure."

Al-Shabab has produced the first known American suicide bombers, has pledged to retaliate for the killing of Usama bin Laden and, in the words of the White House's top counterterrorism adviser, "continues to call for strikes against the United States."

A federal grand jury in New York has indicted Warsame on nine charges, including providing material support to a terrorist organization.

Prosecutors say he fought for al Shabab in 2009 and provided weapons, communications equipment and training. In addition, he recently traveled to Yemen, where he allegedly received explosives and other military-style training and helped Al Qaeda in the Arabian Peninsula, the group that orchestrated the failed Christmas Day bombing in 2009 and the more recent cargo bomb plot.

According to administration officials, the decision to transfer the suspect into federal custody was unanimous, with high-level officials from the White House, Defense Department and Justice Department weighing in on the issue. Among the reasons, according to one official, was that a federal court prosecution in this case offers longer sentencing options, and there are "a number of legal issues" that would have "posed some significant litigation challenges."

Warsame was arraigned in federal court Tuesday, after being brought to New York aboard a plane late Monday or early Tuesday.

It was a scenario laid out to Congress last week by a top Navy official.

Vice Adm. William McRaven, nominated to head U.S. Special Operations Command, told lawmakers that deciding where to detain someone captured in a place like Somalia or Yemen is "always a difficult issue for us" since Guantanamo Bay is still off the table.

"In many cases, we will put them on a naval vessel and we will hold them until we can either get a case to prosecute them in U.S. court or ... we can return him to a third-party country," McRaven said.

McRaven noted that "certain individuals" fall under the Authorization to Use Military Force, passed by Congress in the wake of the Sept. 11, 2001, terror attacks, and "those are easier to deal with than folks that may not have been under the authority for AUMF."

In addition, McRaven said the option of detaining a foreign suspect in the country they were captured in "becomes a policy issue and a sovereignty issue for various countries."

Still, many Republicans insist Guantanamo Bay is where foreign terror suspects should face justice.

"Anyone who has taken up arms against U.S. forces in the field of battle is an enemy combatant pure and simple and should be treated like one," Senate Minority Leader Mitch McConnell, R-Ky., said recently. "They should be hunted and captured, detained and interrogated, and tried away from civilian populations according to the laws of war. ... Unfortunately, since the earliest days of this administration ... a higher priority has been placed upon prosecution than on executing the war on terror."

During a news conference Wednesday, President Obama said his "top priority in each and every one of these situations is to make sure that we're apprehending those who would attack the United States, that we are getting all the intelligence that we can out of these individuals in a way that's consistent with due process of law and that we ... we prosecute them in a way that's consistent with rule of law."

Speaking elsewhere in Washington on the same day, White House counterterrorism chief John Brennan called civilian courts "our single most effective tool for prosecuting, convicting and sentencing suspected terrorists, and a proven tool for gathering intelligence and preventing attacks."

The U.S. government has been grappling with al-Shabab for several years, especially in Minnesota, where many Somali-Americans live. Since September 2007, at least 20 young men have left for Somalia to train with al-Shabab. Many of them have gone on to fight with al-Shabab against the U.S.-backed Transitional Federal Government in Somalia and African Union troops, according to the Justice Department.