The Russian Foreign Ministry also reported that American special forces could have been involved in the prison raid in order to prevent information leaks about terrorist sponsors.
Commenting on the reports, Abdullah Afzali, deputy head of Badghis provincial council, told Sputnik that the militants had been released by some foreign military.
"Three days ago, foreign military surrounded the Panjboz area, where the IS [Daesh in Arabic] militants were captured by the Taliban five months ago in Faryab province. Foreign military forces killed about 20-30 Taliban members guarding the detention facility. They freed 38 militants, who were taken away in an unknown direction," the official said.
Afzali also noted that the local population was aware of the whereabouts of Daesh prisoners.
"The locals saw IS [Daesh in Arabic] militants from close range. Most of them are foreigners from Russia, China, Uzbekistan, Tajikistan and other countries. There were women among them. All of the residents knew about it," he stated.
According to the politician, the operation was carried out during the hours of darkness with the support of ground and air cover.
*Daesh (also known as ISIS/ISIL/IS) is a terrorist organization banned in Russia