The Senate Republican leader on Wednesday accused the Obama administration of undermining U.S. national security by bringing a Somali man facing terrorism charges to New York for trial.

In a speech on the Senate floor, Sen. Mitch McConnell assailed the administration's decision, arguing that the Somali citizen - Ahmed Abdulkadir Warsame - belongs at the U.S. prison at Guantanamo Bay, Cuba, where he could be tried by a military tribunal.

"The administration has purposefully imported a terrorist into the U.S. and is providing him all the rights of U.S. citizens in court," McConnell said. "This ideological rigidity being displayed by the administration is harming the national security of the United States of America."

Senior administration officials said Tuesday that the military captured Warsame on April 19, and then put him aboard a Navy warship, where he was interrogated at sea by intelligence officials. 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.

"Why? Why? Why is a man, who is a known terrorist and enemy of the United States, being afforded these protections?" McConnell, R-Ky., asked. "And now, he is in the hands of the civilian authorities and will be given all the rights accorded to a U.S. citizen in a civilian court."

A senior administration official defended the decision, saying the Defense Department and intelligence officials agreed with other members of the national security team that Warsame should be prosecuted in civilian courts. The official also said they interrogated him for two months to obtain as much information as possible and only when they finished, did they bring in the FBI, which read Warsame his Miranda rights. He waived those rights.

The officials spoke on condition of anonymity because the case is ongoing.

In a statement, Rep. Peter King, R-N.Y., chairman of the House Homeland Security Committee, said Warsame belongs at Guantanamo, not in a civilian court, and expressed concern about the security costs for New York police.

"He is not an American citizen, nor did his criminal acts or his detention occur in the U.S. He is a Somali who traveled to Yemen for terror training. Warsame is a foreigner and an unlawful enemy combatant," King said.

President Barack Obama has said he would like to close the facility at Guantanamo, but Congress has repeatedly stopped the administration from transferring any detainees out of Guantanamo for trial in the U.S. Many in Congress want military commissions to handle the trials of terrorism cases.

McConnell's remarks drew an immediate rebuke from Sen. Dick Durbin of Illinois, the No. 2 Democrat in the Senate, who pointed out that under the administrations of Republican President George W. Bush and Obama more than 400 suspected terrorists have been tried in civilian courts in the United States and are serving time in U.S. prisons.

"To come here and second-guess the president because he's held a man for two months in military interrogation and now is being prosecuted in our criminal courts is totally unfair, unfair because the same standard was not applied to the Republican president who tried hundreds of would-be terrorists, accused terrorists in our criminal courts successfully," Durbin said.

At the White House, spokesman Jay Carney defended the administration's decision to detain Warsame for two months to allow intelligence officials to interrogate him.

"Wherever possible, first priority is and always has been to apprehend terrorist suspects and preserve the opportunity to elicit valuable intelligence that can help protect the American people," said Carney, who added that the government acquired valuable information.

Carney said the Red Cross was told of his detention and officials had a chance to visit the site and interview the detainee.

Matthew Waxman, a former Pentagon adviser on detention issues in the George W. Bush administration, said, "Congressional Republicans are wrong to try to restrict the president's options. I think it's misguided as a matter of principle and long-term terrorism policy."

Waxman, who served the Bush administration in various posts from 2001 to 2007, said, "These cases come with their own complexities and I think any effort to try to craft a one-size-fits-all approach is dangerous."

Now a professor at Columbia University law school, Waxman said the Obama administration after weighing a number of options probably concluded that in this instance criminal prosecution may have been the best available option for ensuring "that this guy is kept off the streets for a long time."