US Defense Secretary Chuck Hagel and Afghan President Hamid Karzai resolved disagreements on Saturday regarding the transfer of Bagram Prison - also known as the Detention Facility in Parwan - to Afghan officials.

"[Hagel] welcomed President Karzai's commitment that the transfer will be carried out in a way that ensures the safety of the Afghan people and coalition forces by keeping dangerous individuals detained in a secure and humane manner in accordance with Afghan law," Pentagon press secretary George Little said in a statement.

Two weeks ago, transfer talks came to a halt when Hagel refused to finalize the agreement without a guarantee from the Afghan government that it would not release prisoners considered dangerous by the US.

Karzai had said Bagram's detainees were innocent, leading US officials to worry that he would release prisoners who would return to insurgency.

The spat caused embarrassment to the US defense secretary, who had only recently assumed the post.

Under the agreement reached on Saturday, Afghan officials are scheduled to assume full authority over the prison at the beginning of next week.

Bagram Prison houses suspected insurgents.

In September, Afghanistan assumed control over some 3,000 prisoners there, though the US maintained authority of several hundred inmates and final veto power over any releases.

It was unclear from initial report whether the US would retain veto power under the terms of the new agreement.

The transfer of the notorious prison comes ahead of the 2014 withdrawal of the majority of NATO's 96,000 troops currently serving in Afghanistan.

kms/jlw (AP, AFP, Reuters)