A Taliban commander released from the Guantanamo Bay prison by former President Barack Obama masterminded the takeover of Kabul, it was reported.

Khairullah Khairkhwa, arrested after the 9/11 terrorist attacks, was held at Guantanamo Bay from 2002-14 after Pentagon officials accused him of ​​being a close associate of Osama bin Laden and was deemed too dangerous to be released, the New York Post reported Monday night.

Khairkhwa was released in exchange for an American deserter, who later was court-martialed. At the time of the 2014 release, Obama assured the public that Khairkhwa and four other enemy combatants would be transferred to Qatar and kept from causing any trouble in Afghanistan.

However, the freed detainees quickly used Qatar as a base to form a regime in exile.

In fact, members of the Taliban Five were recognized by Western diplomats as official representatives of the movement during recent “peace” talks, the Post said. Khairkhwa actually sat across the table from President Joe Biden’s envoy to Afghanistan, Zalmay Khalilzad, in Moscow.

Khairkhwa was part of the official Taliban delegation that negotiated the final terms of the U.S. withdrawal.

“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 said at the summit.

Taliban fighters told Al Jazeera they were arranging to bring back their leadership from Qatar upon securing the Kabul, the capital city of Afghanistan.

Taliban co-founder Abdul Ghani Baradar Akhund, among prisoners released by the Afghan government as a result of the February 2020 peace deal signed by the Trump administration and the Taliban, on Tuesday returned to Afghanistan for the first time in nearly 20 years, Yahoo News reported Wednesday.

One Taliban member, who claimed he had been detained at Guantanamo Bay, slammed America for “oppressing our people for 20 years.”

Khairkhwa earlier this year assured the administration the Taliban would not launch a spring military offensive if Biden committed to removing all remaining U.S. troops. He also promised not to retaliate against any Afghans who worked with the U.S. military or the U.S.-backed government in Kabul.

Reports coming out of Afghanistan indicated the Taliban were going door to door to punish their enemies and people who cooperated with Westerners.

Khairkhwa previously has overseen beheadings and stonings while instated as the Taliban’s interior minister, the Daily Mail reported.

Obama released Khairkhwa and four other combatants in exchange for the Taliban releasing U.S. Army Sgt. Robert Bergdahl, who was captured after deserting his post in Afghanistan.

Obama celebrated Bergdahl as a heroic “POW,” but the soldier ultimately was court-martialed and pleaded guilty to desertion and misbehavior before the enemy after the facts of his disappearance and capture became known.