Image copyright AP Image caption Latif Mehsud was second-in-command to the former Pakistan Taliban chief Hakimullah Mehsud

A senior Pakistani Taliban commander, Latif Mehsud, has reportedly been handed over to Pakistan by the US from Afghanistan.

The US military confirmed it "transferred custody" of three Pakistanis, but did not reveal their identities.

The Afghan government was not involved in the transfer, the US said.

Correspondents say the repatriation of a senior Taliban figure is extremely unusual.

It could relate to attempts to improve Afghanistan-Pakistan ties, they say.

Secret flight

While the US did not confirm Latif Mehsud was among those transferred, Pakistani officials said Latif Mehsud had been "released".

Several senior officials said that the commander had been secretly flown to Pakistan earlier this week.

The identity of the other two men is not yet known. The three men had been held by the US at Bagram airbase in Afghanistan.

The office of the US Forces in Afghanistan said that the transfer took pace after talks between the US and Pakistan.

"In making a decision to transfer a detainee, we take into account the totality of relevant factors relating to the individual and the government that may receive him, including but not limited to any diplomatic assurances that have been provided," the US military said in a statement.

Warming in relations

Latif Mehsud was second-in-command to the former Pakistan Taliban chief Hakimullah Mehsud, who was killed in a US drone strike last year.

He was seized by the Afghan army in October 2013 in eastern Afghanistan, close to the Pakistani border, then held by US forces at Bagram airbase.

Image copyright AP Image caption The Pakistani Taliban has been fighting the Islamabad government since 2007

There were unconfirmed reports at the time that he was returning from talks over a mooted prisoner swap deal, and his capture is said to have angered then-Afghan President Hamid Karzai.

The latest development is leading to speculation that such exchanges could be in prospect now, reports the BBC's Mike Wooldridge in Kabul.

There does currently appear to be some warming in relations between Afghanistan and Pakistan, which have repeatedly accused one another of failing to act against cross-border militancy, our correspondent says.

Meanwhile, Afghanistan's new President Ashraf Ghani has said he is committed to striving for a peaceful solution to the conflict with the Taliban.

Taliban prisoners have been freed in the past in a bid to help peace efforts.

Pakistan's government entered talks with the Tehreek-e-Taliban Pakistan (TTP) in February.

The hardline Islamist movement has been waging its own insurgency against the Islamabad government since 2007, leaving tens of thousands of people dead.