American troops have captured a senior leader of the Pakistani Taliban in a military operation, a United States official said, in what could prove a major blow to the Islamic militant group.

"I can confirm that US forces did capture... terrorist leader Latif Mehsud," State Department deputy spokeswoman Marie Harf said, describing him as a senior commander in the Tehreek-e-Taliban Pakistan (TTP).

She gave no details of the operation and did not say where or when his capture took place, as the news filtered out during a surprise visit to Kabul by US secretary of state John Kerry.

Pentagon officials, however, said Mehsud was still inside Afghanistan, without specifying where.

"As part of the armed conflict against Al Qaeda, the Taliban, and associated forces, authorised by Congress in the 2001 Authorisation for the Use of Military Force, Mehsud was captured and is being lawfully held by US military forces in Afghanistan," Pentagon spokeswoman Commander Elissa Smith said.

The Washington Post reported, however, that he had been seized recently in eastern Afghanistan, and was snatched away from Afghan intelligence operatives who had been trying to recruit him as a possible go-between for the struggling reconciliation efforts between Kabul and the Afghan Taliban.

US officials would not immediately comment on the report.

Capture helpful for US-Pakistan relations: analyst

The TTP, which is based in the lawless areas along the Afghan border in Pakistan, is closely linked to both Al Qaeda and the Afghan Taliban, a separate group led by Mullah Omar, which was toppled from power in Kabul in the 2001 US-led invasion.

Mehsud's capture will be "helpful" for US-Pakistan relations as Islamabad has been "calling for more help in going after the TTP in Afghanistan," said Seth Jones, a former adviser to US special forces and analyst at the RAND Corporation think tank.

"For regional cooperation, the US picking up a TTP commander in Afghanistan has got to be looked at in a positive way in Islamabad," Mr Jones said.

News of the capture came as Mr Kerry landed in Kabul for difficult talks about leaving a residual US force behind in Afghanistan after international forces withdraw by the end of 2014.

The US has imposed a deadline of October 31 to secure the bilateral security deal.

A US official said Friday's meeting between Mr Kerry and Afghan president Hamid Karzai, who said earlier this week that he was prepared to walk away if Kabul was not satisfied, were "constructive".

"It is fair to say that the differences that exist were narrowed on the vast of majority of the outstanding issues," the official said.

It was unclear whether Mr Karzai had raised the issue of Mehsud's capture, after reports that he had been angered by the incident.

"The Americans forcibly removed him and took him to Bagram," a Karzai spokesman, Aimal Faizi, told the Post.

Bagram air base is a military base which includes a detention facility where the US continues to hold more than 60 foreign fighters among about 3,000 detainees.

Mehsud had only just agreed to meet with agents from Afghanistan's National Directorate of Security after months of conversations, Mr Karzai's spokesman said.

"Mehsud is a senior commander in TTP and served as a trusted confidante of the group's leader Hakimullah Mehsud," Ms Harf told reporters, adding the group had claimed responsibility for the attempted bombing of Times Square in New York in 2010.

The group "had also vowed to attack the US homeland again," she said.

It was not immediately clear if Latif Meshud is related to Hakimullah Mehsud, who took over as the commander of the Pakistani Taliban in 2009 after his predecessor was killed in a US drone strike.

Botched efforts by the US in June to launch peace talks with the Afghan Taliban infuriated Mr Karzai when the Taliban briefly opened up an office in Qatar.

Pakistan's tribal districts near the Afghan border are rife with homegrown insurgents, Al Qaeda agents and Taliban, who are understood to use rear bases in Pakistan to plot attacks in neighbouring Afghanistan.

The mountainous region lies outside direct government control and US drone strikes on militant commanders in the region are a key plank in the US strategy to defeat Al Qaeda and reverse the insurgency in Afghanistan.