Updated

The U.S. military in Afghanistan has handed over three Pakistani detainees to Islamabad, including one who Pakistani intelligence officers said is a senior Taliban commander long wanted by the Pakistani government.

The transfer of Latif Mehsud, a close confidante of the former head of the Pakistani Taliban, underlines the improving relations between the U.S., Pakistan and Afghanistan. Pakistan has long demanded that Afghanistan hand over militants operating in its territory, and the issue was a source of sharp tension between Pakistan and former Afghan President Hamid Karzai.

The U.S. did not name the prisoners but two Pakistani intelligence officials say Mehsud was among them. The officials spoke on condition of anonymity because they were not authorized to speak to the media.

The U.S. said in a statement Sunday that the transfer happened Saturday.

"Yesterday, acting on behalf of the United States Government, we transferred custody of three Pakistanis held in U.S. custody in Afghanistan to Pakistan. This followed consultations between the United States and Pakistan and after receiving appropriate assurances. We cannot comment on the identities of the detainees," the U.S. military said.

The military said the Afghan government was not involved in the transfer. A spokeswoman for Afghan President Ashraf Ghani said Mehsud was not in Afghan custody at the time and that they were gathering information about his release. The Pakistani Foreign Ministry referred all questions to the Interior Ministry, which could not be reached for comment.

Mehsud was captured in October of last year by American forces. He was a driver for the former Pakistani Taliban head, Hakimullah Mehsud, and eventually became a trusted deputy to the militant commander, who was killed in November of last year in an American drone strike.

Newly-elected Afghan President Ashraf Ghani visited Pakistan in November. The visit was seen as an attempt to repair ties with Pakistan, which has long had a rocky relationship with Afghanistan. Former Afghan president Karzai repeatedly accused the Pakistani government of harboring militants who launched cross-border attacks.

Part of the reason for the improved ties has been a military operation launched in June by the Pakistani military in the North Waziristan tribal area, something long demanded by the United States. North Waziristan is home to both local and Al Qaeda-linked militants.

Meanwhile, there was conflicting information about a possible drone strike in Pakistan's rugged tribal region. Four Pakistani intelligence officers said a suspected U.S. drone fired two missiles at a compound in the village of Khara Tanga in the Datta Khel area of North Waziristan and that a top Al Qaeda-linked Pakistani Taliban leader, Omar Farooq, was possibly killed in the strike. But other military officials denied there was any drone strike in the region.

All the officials spoke on condition of anonymity because they were not authorized to speak to journalists.