WASHINGTON — The House Armed Services Committee has dealt a blow to President Obama’s hopes to shutter the military prison at Guantánamo Bay, Cuba, by unanimously approving legislation that would prohibit creating a detention center inside the United States.

The administration had asked Congress to approve about $350 million to buy and renovate a nearly empty prison in Thomson, Ill. The White House plan was to empty Guantánamo and transfer its detainees to Illinois — including 48 who would be held without trial as wartime prisoners.

But late Wednesday, the House committee unanimously approved a defense bill for 2011 that bans spending money to build or modify any facility inside the United States to house Guantánamo detainees, according to a summary of the bill.

It says the committee wants to see “a thorough and comprehensive plan that outlines the merits, costs, and risks associated with utilizing such a facility. No such plan has been presented to date. The bill prohibits the use of any funds for this purpose.”