WASHINGTON — The Obama administration only finalized the exchange of the last remaining U.S. prisoner of war in Afghanistan for five Taliban detainees at Guantanamo a day before the swap, a top Democratic lawmaker said Tuesday. He said American officials didn’t learn the pickup location for Sgt. Bowe Bergdahl until an hour ahead of time.

Sen. Dick Durbin of Illinois, the Senate’s No. 2-ranked Democrat, presented the timeline as an explanation for why President Obama didn’t inform Congress 30 days before the May 31 prisoner trade. Republicans and some Democrats have sharply criticized the president for failing to notify them and contend he broke the law. Obama says he acted legally.

“They knew a day ahead of time the transfer was going to take place,” Durbin told reporters in the Capitol, where military officials briefed the Senate Armed Services Committee behind closed doors. “They knew an hour ahead of time where it was going to take place.”

Durbin spoke as a House panel overwhelmingly backed a measure barring U.S. funds for the transfer of detainees from the prison at Guantanamo Bay, Cuba, amid the congressional outcry over the swap.

On a bipartisan 33-13 vote, the Appropriations Committee added the provision to a $570 billion defense spending bill. The measure bars 85 percent of the funds in the account for overseas conflicts until Defense Secretary Chuck Hagel reassures Congress that congressional notification on Guantanamo transfers will be respected.

The administration exchanged Bergdahl, held captive by the Taliban since 2009, for five Taliban officials who had been at Guantanamo for more than a decade. The five were sent to Qatar, where they are to remain for a year.

House Speaker John Boehner lamented Tuesday that although he was briefed on the super-secret mission to take out Osama Bin Laden in 2011, he was kept in the dark about the prisoner agreement with the Taliban. Although Boehner and other lawmakers voiced concerns when told more than two years ago about the possibility of the trade, the Ohio Republican told reporters he “was never briefed on any specific negotiation.”

In the week since the deal, lawmakers have raised questions about whether Bergdahl was a deserter and whether the United States gave up too much for his freedom.

Many members of Congress have cited intelligence suggesting the high-level Taliban officials could return to the Afghanistan battlefield.

Particularly galling for lawmakers was a detail Republicans said emerged in a closed-door briefing Monday night with administration officials that 80 to 90 members of the U.S. government knew of the swap but not a single member of Congress.

The White House said the circle of officials aware of the mission was smaller, and informing Congress would have increased the risk of a leak. “Making a lot of phone calls around town doesn’t seem like a very prudent measure,” spokesman Josh Earnest told reporters Tuesday.

Rep. Howard “Buck” McKeon, R-Calif., the House Armed Services Committee chairman, announced after Monday’s House briefing that he’d investigate the deal. Hagel will testify before his panel Wednesday. No such probe is occurring in the Democrat-led Senate, but GOP Sen. Jeff Sessions, R-Ala., demanded similar open hearings.

“It’s got to be demoralizing for our allies. It’s got to be demoralizing for our soldiers. It’s got to embolden the people we’re fighting against. We’re at war,” Sessions told reporters.

Defending the administration’s conduct, Durbin blasted his colleagues in Congress for focusing on the lack of notification, even if one of the loudest critics has been a party colleague: Sen. Dianne Feinstein of California, who heads the Senate Intelligence Committee.

“Are we saying that once we decided to do the prisoner transfer, we had to notify Congress and wait 30 days?” Durbin asked. “The president couldn’t do that. It was impossible. It could have endangered the man’s life by waiting 30 days.”

The law on notification “doesn’t square with reality,” he added.

Durbin said he expected public doubts to subside as people learn more about Bergdahl’s experience.

Sen. Carl Levin, D-Mich., the Senate Armed Services Committee chairman, said he and his colleagues learned more Tuesday about how Bergdahl was held captive in a cage. He also rejected claims that Bergdahl “cavorted with the enemy, which has no basis in fact at all.”