The House on Thursday overwhelmingly passed a revised $607 billion defense policy bill that restricts President Barack Obama's efforts to close the military prison at Guantanamo Bay, Cuba. 

The vote was 370-58. The measure was revised to align with the budget agreement the president signed into law on Monday. 

The White House said Wednesday Obama remains opposed to provisions hampering his ability to transfer the 112 detainees out of Guantanamo and move them either to other countries or the United States. Spokesman Josh Earnest said there was no veto threat but that the president still must review the bill. 

Obama vetoed the original bill over a larger spending issue. But that dispute was resolved, and Obama on Monday signed a bipartisan budget bill that avoids a catastrophic U.S. default and puts off the next round of fighting over federal spending and debt until after next year's presidential and congressional elections. 

"There are an increasing number of questions around the world about whether the United States is in retreat -- about whether we are willing to continue to engage in world leadership," said Rep. Mac Thornberry, R-Texas, chairman of the House Armed Services Committee. 

He said passing the bill for the 54th time will convince U.S. allies and others that the United States remains a world leader. 

"The bill is good for the troops, good for the country, and hopefully, all the political maneuvering is behind us," he said. 

Washington state Rep. Adam Smith, the senior Democrat on the committee, said the bipartisan bill is a "reflection of how the Congress" should work and that it brings stability to Pentagon acquisition and the need for long-term planning. 

To align the defense policy bill with the new budget agreement, the leaders of the Senate and House Armed Services committees had to agree on trimming $5 billion from the original bill. 

Among the adjustments were $230,000 for the next-generation bomber to replace the aging bomber fleet -- money that the Pentagon wasn't going to spend anyway because it took longer than expected to sign the contract to build it; $1 billion saved because of lower-than-anticipated oil prices; and $442 million in readiness funds for the Army and National Guard. 

The bill, however, still restricts the president's ability to transfer detainees out of the U.S. military prison at Guantanamo Bay. Closing the prison was a priority of Obama's 2008 presidential campaign, and he promised during his first days in office that he would eventually shutter the facility, which he argues is costly and gives extremists a recruiting tool. 

But the administration has faced strong resistance from Republicans and some Democrats in Congress who oppose moving the terror suspects to prisons in the U.S. 

The White House is preparing to release the administration's plan to close the prison, which is expected to propose transferring some detainees to places in the United States where they could be securely held -- an idea that already has drawn heavy opposition on Capitol Hill. The law currently bans detainees from being transferred to U.S. soil, but facilities in several states, including Kansas, South Carolina and Colorado have been discussed. 

On Wednesday, White House press secretary Josh Earnest hinted that the president might use his executive authority to close the prison. Obama wants to work with Congress to close Guantanamo Bay, but "if Congress continues to refuse," the president will explore all other options, Earnest said. 

That prompted Sen. Pat Roberts, R-Kan., to place a hold on Obama's nominee for the secretary of the Army, Eric Fanning, to prevent the White House from taking executive action to close Guantanamo Bay and transfer detainees to the United States. 

The other Republican members of the Kansas delegation -- Sen. Jerry Moran and Reps. Lynn Jenkins, Mike Pompeo, Tim Huelskamp and Kevin Yoder -- all expressed opposition to the White House stance on the issue.