(CNN) -- The United States calls them "dangerous insurgents."
But Afghan authorities say they don't have enough evidence to keep the 65 prisoners behind bars.
Abdul Shukor Dadras, head of the Afghan Review Board, said Afghanistan's attorney general ordered the prisoners' release from Bagram prison after a careful review of 88 cases.
The U.S. military in Afghanistan condemned the move, expected to begin Thursday, arguing that the prisoners pose threats to security forces and civilians.
"Detainees from this group of 65 are directly linked to attacks killing or wounding 32 U.S. or coalition personnel and 23 Afghan security personnel or civilians," the military said in a statement.
Releasing them, the military said, violates agreements between the United States and Afghanistan and is "a major step backward for the rule of law in Afghanistan."
"We have made clear our judgment that these individuals should be prosecuted under Afghan law. We requested that the cases be carefully reviewed," the U.S. military's statement said. "But the evidence against them was never seriously considered, including by the attorney general, given the short time since the decision was made to transfer these cases to the Afghan legal system."
Abdul Basir Azizi, a spokesman for Afghanistan's attorney general, said the detainees' release was ordered after a review revealed that there wasn't enough evidence against them.
The U.S. military's statement detailed evidence against several of the suspects, noting that the group included an alleged Taliban explosives expert, a suspected Haqqani network commander and a specialist accused of building and placing improvised explosive devices.
It's not the first time Afghanistan's decision to release prisoners has upset the United States.
The early and pretrial release of prisoners by the Afghan government, at times at President Hamid Karzai's hand, frustrated U.S. officials, diplomatic documents released in 2010 by WikiLeaks revealed.
CNN's Qadir Sediqi, Barbara Starr and Sara Mazloumsaki contributed to this report.