The CIA psychologist who helped design a program to interrogate the accused mastermind behind the Sept. 11, 2001, terror attacks says the recent withdrawal from Afghanistan "puts us more at risk."

Dr. James Mitchell criticized the Biden administration's handling of the U.S. military's withdrawal from Afghanistan before Aug. 31 as the nation marks 20 years since 9/11 and said the Taliban will likely place blame for future attacks on other terror groups.

CIA PSYCHOLOGIST WHO INTERROGATED 9/11 MASTERMIND SAYS GITMO ‘DELAYING JUSTICE’

"We've given them arms and money and a safe haven for planning the attacks," Mitchell said. "I don't know what we were thinking."

 A C-17 Globemaster takes off as Taliban fighters secure the outer perimeter, alongside the American controlled side of of the Hamid Karzai International Airport in Kabul, Afghanistan, Sunday, Aug. 29, 2021. (MARCUS YAM / LOS ANGELES TIMES)

 A C-17 Globemaster takes off as Taliban fighters secure the outer perimeter, alongside the American controlled side of of the Hamid Karzai International Airport in Kabul, Afghanistan, Sunday, Aug. 29, 2021. (MARCUS YAM / LOS ANGELES TIMES)

Washington spent more than $80 billion in Afghanistan over two decades and left thousands of weapons in the country after the last U.S. troops left Kabul.

"In terms of responding to any attack that comes out of the Taliban, they're going to probably try to distance themselves from that," he said of the terror group. "You may remember that the Taliban told Biden that 'we won't attack your people,' and then let ISIS attack and kill those 13 Marines. ... The suggestion that we can treat the people that want to impose Sharia law on the world as if they were an ordinary government is, I think, naive."

CIA OPERATIVES WHO LED CHARGE IN AFGHANISTAN FEEL BIDEN'S WITHDRAWAL ‘CATASROPHICALLY MISMANAGED’: AUTHOR

Mitchell, who designed the interrogation program in an effort to get Islamic fighters who had been "trained to resist interrogation" to discuss any future terrorist attacks planned against the United States, said he believes Sharia law and democracy "can't coexist."

"We need to get the families that were stranded out of there," the medical psychologist said. "I think we should put every effort that we can into saving American citizens from what's going on there. I think that the people responsible for doing that ought to be ashamed of themselves."

US psychologist James Mitchell (L) speaks with an interviewer at the American Enterprise Institute in Washington,DC on December 6, 2106. (Photo credit should read THOMAS WATKINS/AFP via Getty Images)

US psychologist James Mitchell (L) speaks with an interviewer at the American Enterprise Institute in Washington,DC on December 6, 2106. (Photo credit should read THOMAS WATKINS/AFP via Getty Images)

Khalid Sheikh Mohammed, the accused planner of the terror attacks whom Mitchell interrogated 2003, and four other Guantanamo Bay detainees appeared together in court Tuesday for the first time in 500 days for pretrial headings after delays brought on by the coronavirus pandemic. 

9/11 MASTERMIND, 4 OTHER GUANTANAMO BAY DETAINEES SEEN SMILING DURING FIRST GROUP COURT APPEARANCE IN 500 DAYS

The hearings, which resumed Friday, are the latest attempt to advance a case that has been bogged down for years amid legal challenges

Mohammed and his four other co-defendants are charged with several crimes, including terrorism, hijacking, and 2,976 counts of murder for their alleged roles in planning and providing logistical support to the Sept. 11 plot. 

CLICK HERE TO GET THE FOX NEWS APP 

The quintet has been held at Guantanamo Bay since September 2006 after several years in clandestine CIA detention facilities following their capture.

Fox News' Lucas Tomlinson and Vandana Rambaran contributed to this report, as well as the Associated Press.