Formal control of Afghanistan's only large-scale US-run prison has been handed over to Kabul, even as disagreements between the two countries over the thousands of Taliban and terror suspects held there marred the transfer.
The handover ceremony took place at the prison next to a sprawling US airfield in Bagram. President Hamid Karzai has called the transfer a victory for Afghan sovereignty.
Shortly after the ceremony, a suicide bomber in the northern city of Kunduz killed 15 people and wounded another 25. The bombing came as a stark reminder that the insurgency is waging a ceaseless campaign against the Afghan government and the US-led Nato military alliance, and that many of those held in the prison have been arrested for organizing such attacks.
In Bagram, Afghan officials hailed the transfer of most of the facility and its prisoners.
"We are telling the Afghan president and the Afghan people that today is a proud day," said Afghan Army General Ghulam Farouk, who now heads the prison.
The Bagram prison, formally known as the Parwan Detention Facility, has been the focus of controversy in the past but never had the notoriety of the prisons at Guantanamo Bay or Abu Ghraib in Iraq.
The prison was built about three years ago to replace a holding pen formerly located in an old Soviet hangar inside the base.
Earlier this year, the prison gained unwanted attention when hundreds of Korans and other religious materials were taken from its library and sent to a burn pit at the military base. The event triggered scores of deadly anti-American protests across Afghanistan; six US soldiers were killed during the violent demonstrations.
The transfer is politically important for Mr Karzai, a member of Afghanistan's Pashtun community who has been trying to assert his authority and counter accusations by Taliban insurgents that he is an American puppet.
The prison's successful transfer also is seen as a critical part of the US handover of responsibilities for such institutions to the Afghan government by the end of 2014, when most foreign troops leave the country.
The US has since the signing of the March 9 handover agreement gradually handed over responsibility for most of the 3,000 detainees held at the prison. As some may have been released or others brought in, the prison's current detainee population under US control is not known but is thought to number in the hundreds.
The US recently suspended the transfer of new detainees apparently because of disagreements with Kabul, which has questioned the long-term detention of suspects without charge after their capture.
The US reportedly fears that Afghan authorities may simply let some detainees go, and appears reluctant to turn over all the suspects it holds.