Afghan officers will begin to take charge of the prison facility at Bagram, currently run by the US military, from next week.
Addressing a news conference at the jail near the capital Kabul on Saturday, US and Afghan officials said the handover of the prison would be gradual over the coming year as Afghan officers still require training.
"This is the start of the process," Mohammad Qaseem Hashimzai, Afghanistan's deputy justice minister, told reporters.
"As a first step we will soon send a team of judicial officials [and] in three months the Afghan national army will take control of the prison facility," he said.
"By January 2011 we'll be in full control of the prison."
General Mohammad Akram, the deputy defence minister, said that in two years the facility would pass from army control to the ministry of justice.
Hoda Abdel-Hamid, Al Jazeera's correspondent at the news conference, said that Afghan and US officials had warned that the handover was a "lengthy" and "difficult process".
"The Americans will certainly continue to have a role at the detention centre," she said.
Prisoners at the controversial prison, which has been compared to the US military facility at Guantanamo Bay in Cuba, have complained about terrible living conditions and long periods of detention without charges or trial.
In 2002, two detainees died after being beaten at Bagram. Officially they were said to have died of natural causes but an inquiry later revealed they had been beaten, chained and deprived of sleep.
However, the prison was recently revamped at a cost of $60 million and has been renamed the Parwan Detention Facility, after province of Parwan where it is located.
Hashimzai desribed the new jail, which can hold up to 1,000 inmates, as a "a model prison".
The centre currently houses about 700 people, "about 30" of whom are non-Afghans and "about five" are juveniles, according US military officials.
In 2008, the International Committee of the Red Cross began organising family visits but they were cancelled last July amid reports of a mass protest by prisoners that went on for months.
But US military officials say the "the atmosphere has now improved".
Al Jazeera's Abdel-Hamid said that an Afghan justice ministry official told the news conference that the handover would improve conditions for inmates at the prison.
|The handover plan came as the US said it was considering an offensive in Kandahar [Reuters]
"He was saying that handing over, even within the limitations they do have at the moment, will certainly have a positive impact because the Afghans who will be manning that facility know better the culture and the traditional of the people here," she said.
"He also said that every single detainee will go through a hearing, ther files will be closely monitored and studied and any detainee who should be released will be released.
"That process started under the Americans - the American commander told us that this month alone 60 detainess had been released after going before a commission."
The planned handover comes as the US prepares to launch a military offensive in Kandahar cityfollowing the military operation to drive Taliban fighters out of the town of Marjah in Helmand province.
A senior US official said the impending operation would be "more comprehensive".
"I think the way to look at Marjah, it's the tactical prelude to larger, more comprehensive operations later this year in Kandahar city," news agencies quoted the unnamed official as saying on Friday.
Afghan troops raised their flag over Marjah as the town was symbolically handed over to the Kabul government's control after two weeks of fighting by a joint Afghan, Nato and US Marine force.