A legendary Al Qaeda explosives expert, whose invention of the “shoe-bomb” endeared him to Usama bin Laden and who may have known about 9/11 in advance, was freed Thursday from Guantanamo Bay, where he became a “highly prolific” source of information for the U.S. government even as his health spiraled.

Tariq Mahmoud Ahmed al Sawah, a 58-year-old Egyptian who once taught bomb-making to Al Qaeda members and created a special floating mine used to target U.S. ships, as well as the footwear explosive used by failed bomber Richard Reid, has been transferred to Bosnia, according to the Obama administration.

“He has been compliant over the last four years,” reads Sawah’s Gitmo file, which was made public by Wikileaks. “He continues to be a highly prolific source and has provided invaluable intelligence regarding explosives, Al Qaeda, affiliated entities and their activities.”

“He continues to be a highly prolific source and has provided invaluable intelligence regarding explosives, Al Qaeda, affiliated entities and their activities.”

- Gitmo file on Tariq Mahmoud Ahmed al Sawah

Officials acknowledge in the file that Al Sawah could revert to his old ways, but note his “cooperation with the U.S. government” could make him unwelcome in terror circles.

A 2008 entry in the file noted that Al Sawah was “morbidly obese,” and suffering from diabetes, fatty liver disease and chronic pain from spinal cord compression. Still, Al Sawah, who fought with the Bosnian army in the 1990s war in Yugoslavia before making his way to Afghanistan in 2000, was once part of the Al Qaeda inner circle.

“Detainee also associated with the planners and perpetrators of international terrorist attacks and other senior al-Qaida members, and may have had advanced knowledge of the 11 September 2001 attacks,” reads his dossier, which Wikileaks posted online along with hundreds of other Gitmo files.

Andrew McCarthy, a former federal prosecutor who helped put blind Sheikh Omar Abdel Rahman behind bars for his role in the 1993 World Trade Center attack, blasted both the Obama administration and Republicans for allowing the military prison in Cuba to be emptied of terror suspects.

"There is no more despicable dereliction of duty than a commander-in-chief’s replenishing of enemy forces while the enemy is still attacking our troops and plotting to mass-murder Americans," McCarthy said.

"The Republican Congress has fecklessly signaled that it will take no meaningful action against the president’s subordination of national security to a radical political agenda," he continued. "Not surprisingly, the president is proceeding apace: Since Congress won’t close Gitmo, Obama will simply empty it."

The latest releases, which included Al Sawah and Yemeni Abdul Aziz Abdullah Ali al Suadi, 41, brought the number of remaining prisoners at the camp down to 91, the lowest since the first detainees began to arrive at the installation in 2002.

Al Suadi has been described as an explosives trainer for Al Qaeda who in 2008 was still considered a potential high risk to the U.S., but also with high intelligence value. He was recommended for release by prison officials less than two years later. He has been at Gitmo since 2002, and is being transferred to the government of Montenegro.

A third detainee, Muhammad Bawazir, a 35-year-old also from Yemen, refused to board a plane as the others were being flown out for resettlement in the Balkans. Transfer to Yemen is not an option, as the nation is in the midst of a bloody civil war, and Bawazir’s lawyer, John Chandler, said he prefers to stay in the military prison for now.

President Obama plans to close the prison and bring the remaining prisoners, who include 9/11 mastermind Khalid Sheikh Mohammed, to American prisons. Last week, 10 Yemeni detainees were released and transferred to Oman.