Afghanistan has taken full control of Bagram military prison from the US, as US-led forces wind down more than a decade of war.
On Tuesday, US Secretary of State John Kerry met for a second day in a row with Afghan President Hamid Karzai to discuss the handover among other issues, as they tried to end recent tensions.
The handover on Monday follows an agreement reached after a week of negotiations between US and Afghan officials, which includes assurances that inmates who "pose a danger" to Afghans and international forces will continue to be detained under Afghan law.
Kerry arrived in Kabul for a surprise trip, holding a news conference with Karzai on Monday in which he said that both governments were "on the same page" on talks with the Taliban, another source of political strain in recent weeks.
Karzai praised the handover as a positive step for the Afghan-US relations, and said that he hoped that negotiations to reach an agreement to govern US presence in Afghanistan after 2014 would reach a favourable conclusion.
On talks with the Taliban, Karzai said that the Taliban would have to join the talks soon, and that neighbouring Pakistan also has a role to play in securing a peace deal.
Earlier, Chuck Hagel, the US defence secretary, spoke with Karzai by phone about the detention facility, which is located next to Bagram airfield.
"The secretary welcomed president Karzai's commitment that the transfer will be carried out in a way that assures 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," George Little, Pentagon spokesman, said in a statement.
After Monday's handover, the facility was renamed the Afghan National Detention Facility at Parwan and the US military said it would provide the Afghan army with advisers and $39m in funding.
The US last year agreed to hand over responsibility for most of the more than 3,000 detainees at the prison to Afghanistan and held a transfer ceremony in September.
US soldiers remained at the prison, however, and controlled the area around it.
A formal ceremony transferring the last prisoners to Afghan custody collapsed at the last minute two weeks ago when General Joseph Dunford, the head of international forces in Afghanistan, called it off after Karzai rejected part of the transfer deal.
The collapse provoked an angry response from Karzai and embarrassed both sides as Hagel was starting his first official visit to the country as defense secretary.
The Afghan government raised concerns about keeping suspects in detention who had not faced any formal charges in court, calling any US insistence to detain suspected anti-state fighters as a violation of sovereignty.
At the formal handover ceremony on Monday, Dunford said the transfer "highlights an increasingly confident, capable and sovereign Afghanistan".
About three dozen non-Afghan detainees, including Pakistanis and other nationals, will remain in US hands under the new agreement. The exact number and nationality of all detainees at the base has never been made public.
Rights groups, meanwhile, have raised concerns about the Afghan government's treatment of detainees at Bagram and elsewhere.
"In the past one year, [...] there hasn't been much progress in reforming detention centres and the prison system in Afghanistan," Horia Mosadiq, Afghanistan researcher at Amnesty, told Al Jazeera.