United States officials handed over three Pakistani prisoners to Islamabad on Sunday, one of whom is a senior Taliban commander long sought after by the Pakistani government, security officials said.

Though the US did not identify the detainees, Pakistani sources say the Taliban commander is Latif Mehsud (pictured above), former number two commander in the Pakistani Taliban and close aid of Taliban chief Hakimullah Mehsud, who was killed in a US drone strike last year.

"TTP (Tehreek-e-Taliban Pakistan) senior commander Latif Mehsud who was arrested was handed over to Pakistani authorities along with his guards," one Pakistani security official said. "They reached Islamabad."

The United States, which had been holding Mehsud since his capture in October 2013, will lose its legal right to detain prisoners in Afghanistan at the end of the year, when the combat mission for the US-led force in the country ends.

The US is believed to be housing several dozen prisoners at a detention center near Bagram airfield, and officials are currently grappling with the question of what to do with the prisoners housed there.

"We're actually just going through and returning all the third-country nationals detained in Afghanistan to resolve that issue," a US embassy spokeswoman said.

The handover comes after series US drone strikes against the Pakistani Taliban, and after the Pakistani military killed an al Qaeda commander who was allegedly plotting a bomb attack on a New York City subway.

Rebuilding trust

Newly-elected Afghan president Ashraf Ghani has said that seeking peace is first priority

Pakistan has long demanded that Afghanistan hand over militants operating in its territory, and the issue was a source of tension between Pakistan and former Afghan President Hamid Karzai. The former president had repeatedly accused the Pakistani government of harboring militants suspected of launching attacks across the border.

Newly-elected Afghan President Ashraf Ghani visited Pakistan in November with a view toward improving relations between the two countries.

"[The handover] shows the level of confidence between militaries of the two countries and (their) intelligence organizations is now far better," Pakistani defense and security analyst Talat Masood said. "Afghans have also realized it is in mutual interest not to support militants of either countries."

bw/se (AP, AFP, Reuters)