President Barack Obama said Friday during an interview with NBC News that he would make the same deal to exchange five Guantanamo Bay prisoners for Sgt. Bowe Bergdahl again, saying it ultimately boiled down to one principle.

“When somebody wears our country’s uniform and they’re in a war theater and they’re captured,” he told Brian Williams, “we’re gonna do everything we can to bring ’em home.”

“And we saw an opportunity and we took it. And I make no apologizes for it. It was a unanimous decision among my principals in my government and a view that was shared by members of the Joint Chiefs of Staff,” he said. “This is something that I’d do again and I will continue to do wherever I have an opportunity if I have a member of our military who’s in captivity. We’re going to try to get ‘em out.”

“By definition, you don’t do prisoner exchanges with your friends, you do them with your enemies,” the president later added.

Obama has faced criticism in recent days for making the deal, after several soldiers provided the media with accounts that suggest Bergdahl was a deserter. Others have even blamed him for the deaths of soldiers involved in the subsequent search for him.

High ranking Republicans have also contended that the president may have violated the law, citing a legal requirement that requires him to notify Congress 30 days in advance before the transfer of detainees from Guantanamo Bay.

Obama told Williams that his administration didn’t have a choice.

“We had to act fast in a delicate situation that required no publicity,” Obama said.

The entire interview is set to air at 8 p.m. ET on NBC.

Follow Oliver Darcy (@oliverdarcy) on Twitter