WASHINGTON (AP) — House Speaker Paul Ryan said Wednesday Republicans are taking legal steps to stop President Barack Obama from closing the U.S. prison at Guantanamo Bay, Cuba, a day after the president unveiled his plan to shutter the facility and move the detainees to the United States.

Ryan told reporters that lawmakers have the votes to block Obama's plan in Congress and enough votes to override any veto. Separately, the Wisconsin Republican said the GOP is "preparing our legal challenge" to ensure the prison remains open and detainees aren't moved to the U.S.

Earlier this month, House Republicans awarded the Jones Day law firm a $150,000 contract to perform the legal work in case Obama tries to move Guantanamo detainees to federal prisons.

"These detainees cannot come to American soil," Ryan said.

Obama has pushed to fulfill a 2008 campaign promise and close Guantanamo, arguing that the facility is a recruitment tool for terrorism worldwide and opposed by some allies. The president has faced strong opposition in Congress, where Republicans and some Democrats maintain there is no alternative and argue they don't want these detainees transferred to U.S. prisons, even maximum security facilities.

Under Obama's plan, roughly 35 of the 91 current prisoners will be transferred to other countries in the coming months, leaving up to 60 detainees who are either facing trial by military commission or have been determined to be too dangerous to release but are not facing charges.

Those detainees would be relocated to a U.S. facility.

Ryan said Obama's plan flouts a longstanding ban annually passed by Congress that blocks the president from transferring Guantanamo detainees to U.S. soil.

"If the president proceeds with knowingly breaking the law ... he will be met with fierce bipartisan opposition here in Congress and we are taking all legal preparations necessary to meet with that resistance," Ryan told reporters. "He can't do it because the law is really clear. I'll just leave it at that."

Drew Hammill, a spokesman for House Minority Leader Nancy Pelosi, D-Calif., criticized Republicans for spending taxpayer dollars on the issue.

"Republicans must stop playing politics with our national security and stop awarding no-bid, taxpayer-funded contracts to politically-connected Washington lawyers to the tune of hundreds of dollars an hour," Hammill said.

In the Senate, Armed Services Chairman John McCain dismissed the plan as incomplete and said GOP senators would join their House counterparts on any legal challenge.

"Absolutely," McCain told reporters at a news conference, adding that Obama has "a proclivity to act by executive order."

Sen. Lindsey Graham, R-S.C., said the Senate would hold hearings on Obama's plan in the coming weeks.

____

Associated Press writer Donna Cassata contributed to this report.