Updated at 11:51 a.m. ET

Defense Secretary Chuck Hagel told lawmakers today that an "extraordinary situation" with a "unique set of dynamics" prevented the White House from notifying Congress in advance about the deal to trade Army Sgt. Bowe Bergdahl for five high-level Taliban prisoners in Guantanamo Bay.

Testifying before the House Armed Services Committee, Hagel said the Obama administration did not have the opportunity to inform Congress about the exchange because of two factors: "First, we weren't certain that we would transfer those detainees out of Guantanamo until we had Sgt. Bergdahl in hand. And second, we had Sgt. Bergdahl in hand only a few hours after making the final arrangements."

Hagel, a former Republican senator from Nebraska, acknowledged that the speed with which Bergdahl was traded for the senior Taliban prisoners "has caused great frustration," but he urged lawmakers to "remember this was an extraordinary situation."

His appearance before the panel marked the first time a senior Obama administration official has faced questions at a congressional hearing over the trade.

Both Republicans and Democrats, including some staunch supporters of the Obama administration, have criticized the deal. They say the cost of the exchange — freeing five Taliban members — was too high, and they have noted that the administration is required by law to give Congress 30 days' notice before prisoners are released from Guantanamo — something not done in this case.

Hagel tackled both criticisms.

"I would never sign any document or make any agreement, agree to any decision, that I did not feel was in the best interest of this country," he said. "Nor would the president of the United States who made the final decision with the full support of his national security team."

He added that the security measures put in place by Qatar, the Arab nation that mediated the talks, assured him "that the risk they [the Taliban prisoners] posed to the United States, our citizens and our interests were substantially mitigated."

And, he said, as far back as 2011, the administration had briefed members of Congress on talks with the Taliban over a detainee exchange involving the same five men.

"Some of you in this room were in those briefings, as I understand," he said.

There have been questions about just how Bergdahl was captured in 2009. He's said that he lagged behind while on patrol. U.S. officials have said he walked off the base with three Afghans; there have been reports that he was captured during an attack on his post; and the Taliban have said they captured a "drunken American soldier." Many service members say they believe Bergdahl is a deserter, and claims have been made — which Hagel rejected today — that service members died in the search for Bergdahl.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.