The Pentagon said that "thousands" of ISIS Khorasan Province (ISIS-K) prisoners were freed by the Taliban during their takeover of Afghanistan in the days leading up to the bombing near the Kabul airport, which killed 13 U.S. service members Thursday.

During a press briefing Friday, Pentagon spokesperson John Kirby responded to a question from Fox News' Jennifer Griffin about how many prisoners were released from the prison at Bagram, Afghanistan, and why they were not removed before the U.S. pulled out its troops.

TRUMP COUNTERTERRORISM OFFICIAL OUTLINES BIDEN'S 'MISSTEPS' LEADING TO DEADLY KABUL BOMBINGS

"How many ISIS-K prisoners were left at Bagram and are believed to have been released from the prison there, and why weren't they removed before the U.S. pulled out to some place like GTMO?" asked Griffin, referring to the Guantanamo Bay Naval Base. 

"Well, I don't know the exact number. Clearly, it's in the thousands when you consider both prisons, because both of them were taken over by the Taliban and emptied. But I couldn't give you a precise figure," responded Kirby.

"And as for emptying out, remember we were turning things over to Afghan national security forces, that was part of the retrograde process, was to turn over these responsibilities. And so they did have responsibility for those prisons and the bases at which those prisons were located. And of course as the Taliban advanced, we didn't see the level of resistance by the Afghans to hold some territory, some bases, and unfortunately those were the bases the Afghans didn't hold."

"But all of those responsibilities were turned over in accordance with the retrograde plan back frame," said Kirby.

ISIS-K: WHAT TO KNOW ABOUT TALIBAN RIVAL SEEN AS THREAT TO AFGHANISTAN EVACUATION

ISIS-K, a more local branch of the global Islamic State of Iraq (ISIS) network, is presumed responsible for the deadly suicide bombing attack in Kabul Thursday.

Nathan Sales, the former ambassador-at-large for counterterrorism under former President Trump, told Fox News that recently freed ISIS-K prisoners likely contributed to the deadly bombing.

Sales said that, although it is premature to draw any firm conclusions, one possibility about how ISIS-K was able to quickly pull off such a sophisticated attack is that ISIS capability in the region enhanced after fighters who were in prison were freed as the Taliban took power after U.S. and NATO troops withdrew.

CLICK HERE TO GET THE FOX NEWS APP

"I think one of the things we'll need to look at is the extent to which escaped ISIS prisoners had a role in planning and carrying out this attack," Sales said.

In remarks after the deadly bombing Thursday, President Biden pledged to take action against ISIS-K militants and complete evacuation operations.

Fox News' Thomas Barrabi contributed to this report.