A Taliban leader who reportedly helped orchestrate the group's takeover of Afghanistan was released by former President Barack Obama in exchange for former U.S. Army Sgt. Bowe Bergdahl in 2014.

Khairullah Khairkhwa, who previously served as the Taliban’s interior minister in Afghanistan, was arrested after the terrorist attacks on 9/11 and was held at Guantanamo Bay from 2002 to 2014. Pentagon officials accused Khairkhwa of ​​being a close associate of Usama bin Laden and deemed him too dangerous to be released. 

But in 2014, he was released from Guantanamo following a prisoner swap deal under the Obama administration. 

OBAMA SHUTS OFF INSTAGRAM COMMENTS AMID AFGHANISTAN COLLAPSE

The U.S. released five Taliban leaders, known as the "Taliban Five," that year in exchange for the Taliban releasing Bergdahl, who was captured after he deserted his post in Afghanistan. The Taliban Five were then flown to Qatar and are the only Guantanamo Bay "forever prisoners" to be released without the parole board’s approval, the New York Post reported

Late Arizona Sen. John McCain criticized the move at the time and said the five "are the hardest of the hard-core. These are the highest high-risk people."

BIDEN SHIFTS BLAME FOR AFGHANISTAN FALLING TO TALIBAN

It is unclear if President Biden supported Obama’s release of the leaders.

Obama praised Bergdahl's release in 2014 and added: "We’re committed to winding down the war in Afghanistan and closing Gitmo."

U.S. President Barack Obama (R) watches as Jami Bergdahl (L) and Bob Bergdahl talk about the release of their son, prisoner of war U.S. Army Sergeant Bowe Bergdahl, during a statement in the Rose Garden at the White House in Washington May 31, 2014. Obama, flanked by the parents of Army Sergeant Bowe Bergdahl, a U.S. soldier who is being released after being held for nearly five years by the Taliban, said in the White House Rose Garden on Saturday that the United States has an "ironclad commitment" to bring home its prisoners of war. REUTERS/Jonathan Ernst (UNITED STATES - Tags: POLITICS MILITARY) - GM1EA610J6201

Former President Barack Obama watches as Bob and Jami Bergdahl discuss the release of their son, Bowe Bergdahl. (Reuters)

Bergdahl, however, later pleaded guilty to desertion and misbehavior before the enemy in 2017 and has been slammed by former President Donald Trump as a "dirty rotten traitor."

OBAMA-ERA AFGHANISTAN AMBASSADOR HAS 'GRAVE QUESTIONS' ABOUT BIDEN'S 'ABILITY TO LEAD' US

The New York Post reported that some of the Taliban leaders pledged to fight American forces after their releases from Guantanamo Bay, but that Western diplomats eventually recognized them as official Taliban spokesmen during recent peace talks. Khairkhwa even allegedly sat across from President Biden’s envoy to Afghanistan, Zalmay Khalilzad, during negotiation talks in Moscow in March. 

"I started jihad to remove foreign forces from my country and establish an Islamic government, and jihad will continue until we reach that goal through a political agreement," Khairkhwa reportedly said at the summit.

Members of the Taliban delegation: former western Herat Gov, Khairullah Khairkhwa and member of the negotiation team Suhail Shaheen attend a joint news conference in Moscow, Russia, March 19, 2021. Alexander Zemlianichenko/Pool via REUTERS

Members of the Taliban delegation: former western Herat Gov, Khairullah Khairkhwa and member of the negotiation team Suhail Shaheen attend a joint news conference in Moscow, Russia, March 19, 2021. Alexander Zemlianichenko/Pool via REUTERS ( Alexander Zemlianichenko/Pool via REUTERS)

BOWE BERGDAHL TARGETS TRUMP, MCCAIN COMMENTS IN LAWSUIT CHALLENGING COURT-MARTIAL

Now, Khairkhwa is being described by the Post as the "mastermind of the regime change," and Taliban fighters said they were planning to bring their leaders from Qatar to Afghanistan after securing Kabul – with one of the fighters even claiming he also spent eight years in Guantanamo Bay, the newspaper said.

Biden has already reversed a Trump-era policy to release Guantanamo Bay prisoners in a bid to close the prison, releasing his first prisoner, accused terrorist Abdul Latif Nasser, last month. 

Obama has not yet issued a statement on the collapse of Afghanistan, and commenting on his Instagram page was temporarily halted Monday morning after it was flooded with calls for him to do something about the takeover. 

The Office of Barack and Michelle Obama did not immediately return Fox News’ request for comment on Khairkhwa's release and reports stating the former prisoner helped orchestrate the takeover.

CLICK HERE TO GET THE FOX NEWS APP

Biden, meanwhile, addressed the nation on Monday and said he stands "squarely behind" his decision to withdraw U.S. troops from Afghanistan.

"American troops cannot, and should not, be fighting in a war and dying in a war that Afghan forces are not willing to fight for themselves," Biden said, adding: "Truth is, this did unfold more quickly than we had anticipated."