KABUL, Afghanistan (AP) -- The U.S. military signed a last-minute agreement Friday to transfer its main detention center in the country to Afghan control in six months - a key step toward a long-term pact on U.S. military presence in Afghanistan.
The deal removes a sticking point that had threatened to derail talks between the two countries for a long-term partnership that is critical to defining the U.S. role as it draws down troops here.
The two sides have been in negotiations for months over a partnership deal, and Afghan President Hamid Karzai had set a Friday deadline for the U.S. to hand over the 3,000 Afghans it holds at its Parwan detention facility. On Thursday, President Barack Obama and Karzai discussed the stalled security pact talks in a video conference. White House press secretary Jay Carney said the two leaders noted progress toward completing an agreement "that reinforces Afghan sovereignty while addressing the practical requirements of transition."
The deal signed Friday extends the deadline for handing over the detainees but for the first time spells out an American commitment to a hard transfer date. Under the agreement, the U.S. will still have access to Parwan and will be able to block the release of detainees it thinks should continue to be held.
The accord gives a boost to the stalled talks over formalizing a role for U.S. forces after NATO's scheduled transfer of security responsibility to the Afghan government at the end of 2014. The detainees issue had been a major point of contention, as well as the still unresolved question of night raids by international troops on the homes of suspected militants, which have caused widespread anger among Afghans and which Karzai has demanded be halted.
U.S. and Afghan officials have said that they want a strategic partnership agreement signed by the time a NATO summit convenes in Chicago in May.
Gen. John Allen, the commander of U.S. and NATO forces in Afghanistan, called Friday's deal a sign of real progress toward the larger partnership.
"This is an important step. It is a step forward in our strategic partnership negotiations," Allen told reporters in the capital before signing the agreement alongside Defense Minister Abdul Rahim Wardak.
The deal concerns Parwan, a U.S.-run prison adjoining its Bagram military base north of Kabul. The new deal will put an Afghan general in charge of Parwan within days, according to presidential spokesman Aimal Faizi, but will also give a six-month window to gradually transfer detainees to Afghan oversight.
According to the document, the U.S. will continue to provide logistical support for 12 months and a joint U.S.-Afghan commission will decide on any detainee releases until a more permanent pact is adopted. The joint commission will have to come to a consensus on any such decision, according to U.S. officials involved in the negotiations - a setup that will essentially give U.S. officials power to block any releases they do not agree with.
The officials, who spoke anonymously to discuss confidential talks ahead of the signing, said the first 500 detainees are expected to be transferred in 45 days. The U.S. government had already handed over a few hundred detainees to the Afghans previously.
The officials said the deal does not apply to the approximately 50 non-Afghans at Parwan, who will remain in U.S. custody.
The officials also said that they still need to work out how new detainees will be handled. Currently, the U.S. military assesses whether people captured on the battlefield are a threat and then either lets them go, hands them over to Afghan authorities or sends them to Parwan.
The U.S. also operates what it has described as temporary holding pens for gathering intelligence from detainees in Afghanistan, though officials have confirmed anonymously that some detainees have been held at these centers for up to nine weeks. The agreement does not appear to address these sites.
Friday's memorandum comes as relations between the U.S. and Afghanistan have become more tense in recent weeks following the burning of Qurans and other religious materials at Bagram military base near the capital Kabul, sparking riots and attacks that killed some 30 people.
The U.S. has apologized and said the Qurans came from the Parwan detention center and were taken out because they had extremist messages written in them, but that they should not have been sent to be burned. Karzai said soon after the Quran burnings became public that these types of incidents would not occur if the Afghans were in charge of the detention facility.
The issue of night raids, meanwhile, still has to be resolved.
Karzai has demanded an end to night raids in Afghan villages by coalition forces. The raids target insurgents, but Karzai has said civilians are too often rounded up or killed when raids turn violent. He insists that if there are night raids, Afghan troops should conduct them alone.
The U.S. officials said talks are already underway on a separate memorandum governing night raids.
The U.S.-Afghan strategic partnership is expected to provide for several thousand U.S. troops to stay and train Afghan forces and help with counterterrorism operations. It would outline the legal status of those forces, their operating rules and where they would be based.
The agreement is also seen as a means of assuring the Afghan people that the U.S. does not plan to abandon their country, even as it withdraws its combat forces.
Associated Press writers Sebastian Abbot and Amir Shah contributed to this report in Kabul.