WASHINGTON - In a major rebuke to President Barack Obama, the Senate voted overwhelmingly Wednesday to block the transfer of Guantanamo detainees to the United States and denied the administration the millions it sought to close the prison.

The 90-6 Senate vote -- paired with similar action in the House of Representatives last week -- was a clear sign to Obama that he faces a tough fight getting the Democratic-controlled Congress to agree with his plans to shut down the detention centre and move the 240 detainees.

The prisoners include 22-year-old Canadian Omar Khadr, who has been held in Guantanamo since October 2002.

The vote came as FBI Director Robert Mueller told Congress that bringing Guantanamo detainees to the United States could pose a number of risks, even if they were kept in maximum-security prisons. Mueller's testimony to a House panel put him at odds with the president and undercut the administration's arguments for shuttering the facility.

"The concerns we have about individuals who may support terrorism being in the United States run from concerns about providing financing, radicalizing others," Mueller said, as well as "the potential for individuals undertaking attacks in the United States."

Last month, Obama asked for $80 million for the Pentagon and the Justice Department to close the facility at Guantanamo Bay, Cuba, by January. In the eyes of the world, the prison has come to exemplify harsh U.S. anti-terror tactics and detention without trial for almost all of its inmates, most of whom were captured in Afghanistan.

The administration put its Democratic allies in a difficult spot by requesting the Guantanamo closure money before developing a plan for what to do with its detainees.

Obama is scheduled to give a major address Thursday outlining in more detail his plans for Guantanamo, but it's already clear that many in Congress have little appetite for bringing detainees to U.S. soil, even if the inmates would be held in maximum-security prisons.

White House Press Secretary Robert Gibbs indicated Wednesday that Obama's plan is still evolving.

"The president hasn't decided where some of the detainees will be transferred. Those are decisions that the task forces are working on and that the president will lay out and discuss tomorrow," Gibbs told reporters.

In recent weeks, Republicans have called for keeping Guantanamo open, saying abuses at the facility are a thing of the past and describing it as a state-of-the-art prison that's nicer than some U.S. prisons. And they warn that terrorists who can't be convicted might be set free in the United States.

"The American people don't want these men walking the streets of America's neighbourhoods," Senator John Thune (R-S.D.) said Wednesday. "The American people don't want these detainees held at a military base or federal prison in their backyard, either."

In another development Wednesday, a federal judge said the United States can continue to hold some prisoners at Guantanamo indefinitely without any charges.

Obama's new Pentagon policy chief, Michele Flournoy, said it's unrealistic to think that no detainees will come to the United States, and that the government can't ask allies to take detainees while refusing to take on the same burden.

"When we are asking allies to do their fair share in dealing with this challenge we need to do our fair share," Flournoy told reporters.

Obama ally Senator Dick Durbin (D-Ill.) pointed out that not a single prisoner has ever escaped from a federal "supermax" prison and that 347 convicted terrorists are already being held in U.S. prisons.

Senator Lindsey Graham of South Carolina, among the few Republicans joining former Republican presidential nominee John McCain of Arizona in calling for Guantanamo to be closed, scoffed at the idea that the government can't find a way to hold Guantanamo prisoners in the United States. Graham noted that 400,000 German and Japanese prisoners were held during the Second World War.

"The idea that we cannot find a place to securely house 250-plus detainees within the United States is not rational. We have done this before," Graham said. "But it is my belief that you need a plan before you close Gitmo."

While allies such as Durbin have cast the development as a delay of only a few months, other Democrats have made it plain they don't want any of Guantanamo's detainees sent to the United States to stand trial or serve prison sentences.

Despite the setback, some Democrats said Obama should not be underestimated.

"The president's very capable of putting together a plan that I think will win the approval of a majority of members of Congress," said moderate Nebraska Democrat Ben Nelson. "I can't imagine that he won't."