A U.S. soldier held captive for five years by the Taliban was finally rescued over the weekend thanks to a controversial agreement reached between the Defense Department and his captors.

Sergeant Bowe Bergdahl is now receiving medical treatment at a German hospital after he was handed over to a group of American Special Forces on Sunday, NPR reported. But it will take months before the sergeant, who suffered at the hands of the Taliban these long years, is ready to be reintroduced into society.

"Bowe has been gone so long that it's going to be very difficult to come back," Bob Bergdahl, the sergeant's father, said according to NPR. Military psychologists advised the father against speaking to his son just yet.

"It's like a diver going deep on a dive and has to stage back up through decompression to get the nitrogen bubbles out of his system. If he comes up too fast, it could kill him."

The Taliban agreed to free Bowe Bergdahl in exchange for the release of five Taliban prisoners from Guantanamo Bay. Congress was not informed about the switch because defense officials determined the captive's life was in immediate danger, Defense Secretary Chuck Hagel said according to the Associated Press.

"It was our judgment that if we could find an opening, and move very quickly with that opening, that we needed to get him out of there, essentially to save his life," Hagel said.

Republicans are criticizing President Barack Obama because he did not tell Congress about the exchange. The law says the president is supposed give Congress 30 days' notice before transferring any prisoner from Guantanamo Bay.  

"Our joy at Sergeant Bergdahl's release is tempered by the fact that President Obama chose to ignore the law, not to mention sound policy, to achieve it," Representative Howard McKeon and Senator James Inhofe said in a joint statement obtained by NPR.

Bowe Bergdahl has been a prisoner of the Taliban since 2009. But the circumstances behind his capture remain unclear, according to the AP.