Afghanistan is to free all but 16 of 88 prisoners regarded as a security threat by the United States.
The US is strongly opposed to their release because it says the prisoners are responsible for more than 60 Nato coalition and 57 Afghan deaths.
America also fears they could return to the battlefield as Nato withdraws.
A meeting chaired by Afghan President Hamid Karzai "ordered the Bagram prisoners' dossier review board to free those prisoners who are innocent and against whom there is no evidence", a statement said.
The statement said that of the 88 prisoners at the centre of the dispute, there was no evidence against 45 of them and only circumstantial information against 27. The remaining 16 would be kept in jail.
US General Joseph Dunford, commander of Nato forces in Afghanistan, had lodged an official objection to the plan, saying it was against the agreement signed when Bagram jail was handed over in March.
Last week a group of US senators met Afghanistan's President Karzai in Kabul to warn him that releasing the detainees from Bagram - also known as the Parwan Detention Facility - would be a "major step backwards".
Bagram jail was passed to Afghan control by the US after a public stand-off with Karzai, who has depicted the jail as a symbol of Afghanistan's efforts to regain its national sovereignty.
The move could further damage relations between the two countries, which have been strained over President Karzai's refusal to sign a security deal to shape the US military presence after most foreign troops leave this year.
:: Watch Sky News live on television, on Sky channel 501, Virgin Media channel 602, Freeview channel 82 and Freesat channel 202.