LONDON (Reuters) – U.S. Defense Secretary Chuck Hagel said the decision to strike a deal with the Taliban for the release of Sergeant Bowe Bergdahl was unanimous in the White House as it was believed that the soldier’s life was “in peril”.

Bergdahl was handed over to U.S. special operations forces in Afghanistan on Saturday after five years in captivity in exchange for the transfer of five senior Taliban members from Guantanamo prison in Cuba to Qatar.

It provoked criticism from some lawmakers in Congress who were angry that U.S. President Barack Obama’s administration had not alerted them in advance, while some of Bergdahl’s former comrades have charged that he was captured after deserting.

Hagel told the BBC in an interview aired on Thursday that Barack Obama’s administration had to act quickly and without first consulting Congress which is supposed to be given 30 days notice before transferring detainees from Guantanamo Bay.

“It was our judgment based on the information that we had that his life, his health were in peril,” Hagel told the BBC in an interview in Romania.

“It was our judgment, and it was unanimous by the way .. that we didn’t want to take any chance here.”

He said the secretary of defense, the secretary of state, chairman of the joint chiefs of staff, director of national intelligence, and attorney general, had all come to the same conclusion.

“You imagine if we would have waited for, taken the chance of leaks over a 30-day period. I will tell you what I know, and I made a judgment on this too, that would seriously imperil us ever getting him out,” he said.

Senator Carl Levin, the Democratic head of the Senate Armed Services Committee, has said Obama did not violate the law requiring 30 days notice as the president put Congress on notice in December last year that he would “act swiftly” regarding detainee transfers if necessary.

The Pentagon says Bergdahl, 28, is in a stable condition at the U.S. Army’s Landstuhl Regional Medical Center in Germany. Officials have indicated there is little desire to pursue any disciplinary action against him given what he has been through.