A Somali citizen captured in April was interrogated aboard a U.S. warship for two months and is now in New York to face terrorism charges.

The case against Ahmed Abdulkadir Warsame shows the Obama administration is sticking by its plan to use civilian courts to prosecute terrorists, a strategy that was successful for years under then President George W. Bush but which has drawn fire from Republicans since President Barack Obama took office.

The case also offers a glimpse at how the U.S. plans to interrogate detainees now that Obama has closed the CIA's network of secret prisons.

The military captured Warsame on April 19, and then put him aboard a Navy warship, where he was interrogated at sea by intelligence officials, senior administration officials said Tuesday. Under interrogation, Warsame gave up what officials called important intelligence about al-Qaida in Yemen and its relationship with al-Shabab militants in Somalia. The two groups have been known to have ties, but the extent of that relationship has remained unclear.

After the interrogation was complete, the FBI stepped in and began the interrogation from scratch, in a way that could be used in court. After the FBI read Warsame his Miranda rights — the right to remain silent and speak with an attorney — he opted to keep talking for days, helping the government build its case.

One of the unanswered questions of the Obama administration's counterterrorism strategy has been what it would do if it captured an important terrorist. Obama does not want to send more people to Guantanamo Bay and the CIA's so-called black sites" are closed.

The unusual case against Warsame was foreshadowed in congressional testimony late last month when Obama's pick to become commander of the Special Operations Command, Navy Vice Adm. William H. McRaven, told senators that the U.S. could hold suspected terrorists on naval ships until prosecutors file charges against them. McRaven didn't say exactly how long that detention could last.

The senior officials who spoke to reporters Tuesday said there are no other detainees in custody aboard ships. They all spoke on condition of anonymity because the case is ongoing.

The normally routine machinations of criminal prosecution have become political issues since Obama took office, promising to end harsh interrogation tactics and close Guantanamo Bay. Congress has blocked the administration from transferring any detainees out of Guantanamo Bay for trial in the U.S., and some in Congress are also questioning whether all new terrorism cases should be handled by military commissions. Most recently, Sen. Mitch McConnell, R-Ky., said two men arrested by the FBI on terrorism charges should be prosecuted at Guantanamo Bay.

That has rankled many at the Justice Department and FBI. Congress has designated the FBI as the nation's lead domestic counterterrorism agency, while questioning whether the FBI's reliance on Miranda warnings and adherence to U.S. civilian law makes them incapable of handling terrorism cases.

Warsame is not believed to be a senior member of either organization, but court documents unsealed Tuesday say he fought with and helped train al-Shabab in 2009, then helped support and train al-Qaida in Yemen until 2011. That makes him a potentially valuable intelligence asset, since he had unique access in both groups.

Senior administration officials said the intelligence interrogations were conducted by the High-Value Detainee Interrogation Group, a team of people from the military, intelligence agencies and Justice Department. Because those sessions were conducted before Warsame was read his rights, the intelligence can be used to underpin military strikes or CIA actions but are not admissible in court.

That's why the FBI restarted the interrogations from the beginning.

Warsame pleaded not guilty at his arraignment Tuesday. His lawyer, Priya Chaudhry, did not immediately return a phone message for comment. Warsame next court appearance was scheduled for Sept. 8.

Court documents unsealed Tuesday show that the Justice Department plans to use a laptop computer, handwriting analysis, USB drives and a memory card as evidence against Warsame at trial.