(CNN) -- A U.S.-run detention center housing 3,000 people will move to Afghan control under a crucial agreement signed Friday that smooths the way toward a larger agreement on the United States' future role in the country.
The agreement, which calls for the gradual transfer of power from U.S. forces to Afghanistan over six months, removes one key sticking point from negotiations over a broader agreement on the role of the United States in Afghanistan after foreign combat troops withdraw in 2014.
Negotiations over the wide-ranging strategic agreement have been going on for more than a year, with little progress. Tensions between the two countries, made worse by the February burning of Qurans by U.S. troops at Bagram Air Base, have complicated the talks.
In November, a loya jirga, or grand assembly of Afghan elders, endorsed the continued presence of U.S. forces after combat operations, but only if the countries could agree on the transfer of prisoners, an end to night raids and eliminating immunity for U.S. troops accused of committing crimes in Afghanistan.
U.S. and Afghan officials have already begun talks on the other major issue gumming up the larger agreement: night raids by U.S. special operations forces, according to U.S. and Afghan officials who jointly briefed reporters.
"The signing of this memorandum is an important step forward in our Strategic Partnership negotiations and very much in keeping with both the Loya Jirga's recommendations and the desires of President (Hamid) Karzai," said U.S. Gen. John Allen, commander of the International Security Assistance Force.
Karzai has repeatedly called for the end of U.S. oversight of detention facilities in the country. On Friday, his spokesman, Aimal Faizi, called the agreement "big progress."
"Things are happening as we wanted," Faizi said.
U.S. Ambassador Ryan Crocker said the memorandum of understanding, or MOU, demonstrates the United States' commitment to Afghan sovereignty and its partnership with Afghanistan, despite ups and downs in the tense relationship between the two countries.
"We have had our challenges, and there will be challenges ahead as we continue negotiations on the framework for our strategic partnership, but this MOU marks an important step forward," he said.
The agreement calls for the United States to transfer all of the approximately 3,000 Afghan citizens currently held under U.S. guard at the Parwan detention facility near Bagram Air Base to Afghan authorities within six months. The first 500 detainees would be transferred within 45 days, according to the agreement.
Transferred detainees will eventually be moved to new facilities being built in Parwan and Pol-I-Charki, but until then will be moved from the U.S. side of Parwan to the Afghan side of the center.
Although detainees would be held by Afghanistan, U.S. forces would remain at Parwan in a "technical advisory and logistical support" role, the officials who briefed reporters said. Afghan commanders also would not have the authority to release detainees on their own, according to agreement.
Any request to release a prisoner would have to be agreed to by a joint committee headed by the ISAF commander and the Afghan defense minister, according to the agreement.
The deal does not apply to about 50 non-Afghan prisoners being held at Parwan. Their fate was unclear.
The officer currently responsible for prison protection, identified by Defense Ministry spokesman Gen. Zahir Azimi as Gen. Safiullah, will take over the Parwan facility, which is the successor to one demolished in 2009 after allegations of abuse. That facility, called the Bagram Theater Internment Facility, was the site of abusive interrogation that ended in the deaths of two detainees in 2002, according to Amnesty International, which has described abusive treatment of detainees at the facility as common.
While the new center has not seen that level of scandal, Amnesty International and other groups have continued to challenge conditions of detention at the facility, including seeking access to U.S. courts for those held at Parwan.
The group also complained in 2010 about allegations of abuse, including isolation, sleep deprivation and exposure to extreme temperatures, at a screening facility at Bagram Air Base.
The Bagram base was also the site of the recent Quran burnings that set off a wave of protests and violence targeting NATO troops. The Muslim holy books had been seized from a detainee center and allegedly contained militant annotations. U.S. President Barack Obama apologized for the incident, saying it was inadvertent.