KANDAHAR, Afghanistan — A longtime deputy in the Taliban who was arrested in a joint intelligence raid by American and Pakistani agents eight years ago has been freed, the insurgent group confirmed on Thursday.

The release of the deputy, Mullah Abdul Ghani Baradar, who is in Pakistan, appeared to be the most tangible result of talks held recently by the Taliban and American diplomats.

Mullah Baradar, who seemed interested in exploring peace negotiations before his capture in January 2010, was the Taliban’s most senior military leader at the time.

American diplomats held talks this month with the Taliban in the Gulf state of Qatar for a second time since the White House ordered direct engagement with the insurgents.