US forces detained Taliban commander Latif Mehsud, the US State Department said Friday, an announcement that has reportedly infuriated Afghan president Hamid Karzai, who hoped to use Mehsud as interlocutor for peace talks.

During a military operation in the Logar province in eastern Afghanistan, US troops seized Mehsud, identified as a senior commander in the Tehreek-e-Taliban Pakistan, a group that claimed responsibility for a 2010 attempted bombing in Times Square, New York.

“Mehsud is a senior commander in [Tehreek-e-Taliban], and served as a trusted confident of the group’s leader, Hakimullah Mehsud,” Marie Harf, deputy spokeswoman for the US State Department, said in Washington on Friday. The group “claimed responsibility… for the attempted bombing of Times Square in 2010 and has vowed to attack the US homeland again. TPP is also responsible for attacking our diplomats in Pakistan and attacks that have killed countless Pakistani civilians.”

Pakistani intelligence said US forces seized Mehsud while he was with the Afghan army, and that they no longer know where he is.

According to reports, the arrest, which actually occurred several weeks ago, enraged Afghan President Karzai, as Afghan intelligence agents had spent months attempting to recruit Mehsud as a mediator for peace talks between Kabul and the Taliban, the Washington Post reported.

Karzai also apparently viewed the arrest of the Taliban leader as a violation of Afghan sovereignty, a senior Afghan official told AP on condition of anonymity.

News of the detention surfaced as US Secretary of State John Kerry was in Kabul attempting to hammer out a security agreement with the Afghan government that would permit the US to keep 5,000 to 10,000 US troops in the country when the US combat mission comes to an end on Dec. 31, 2014.

Kerry was being accompanied on his trip by US Ambassador to Afghanistan James Cunningham and Gen. Joseph Dunford, the top US general in Afghanistan.

“This is really about us building momentum for the negotiators and helping establish conditions for success of the negotiations going forward,” a State Department official told reporters traveling with Kerry.

President Barack Obama told AP in an interview last week that he would be willing to keep a US troop presence in Afghanistan after the NATO mission comes to a close, but acknowledged that doing so would require an agreement with Karzai’s government .

Obama said that if no agreement could be reached, he would be comfortable with a full pullout of US troops: the so-called “zero option.” Of the 87,000 NATO troops now in Afghanistan, 52,000 are American.

Negotiations have been going on between Afghan and US officials on a bilateral security agreement for a year, so far without success.

Relations between Karzai and Washington have been rocky over the years since the US-led invasion and occupation of the country in 2001. Karzai has said he suspects Washington of doing a deal with the Taliban behind his back.

In March, following two Taliban bombings that killed 17 people, Karzai accused the United States and the Taliban of working together to convince Afghans that NATO forces were needed beyond 2014.

“Those bombs, set off yesterday in the name of the Taliban, were in the service of Americans to keep foreigners longer in Afghanistan,” Karzai told reporters.