The meeting with the American officials took place in Doha on Friday, Taliban spokesman said in a statement sent to journalists.

This is the first time that either the Taliban or the US have officially confirmed talks. (Reuters)

Kabul:

A Taliban delegation has met with US envoy Zalmay Khalilzad in Qatar to discuss ending the Afghan conflict, the militant group said Saturday, the first time either side has officially confirmed talks.

The direct negotiations -- a longstanding Taliban demand -- were held as Khalilzad seeks to coordinate efforts with regional countries, including Pakistan and Saudi Arabia, to convince Afghanistan's largest militant group to engage in talks.

The meeting with Khalilzad and other American officials took place in Doha on Friday, Taliban spokesman Zabihullah Mujahid said in a statement sent to journalists.

Taliban and US negotiators discussed a "peaceful end to the invasion in Afghanistan", Mujahid said, referring to the US-led intervention in 2001 that toppled the Taliban regime.

But the group made clear that the presence of foreign forces in the country was a "big obstacle" to peace.

Both sides "agreed to continue such meetings", he added, without providing further details.

A spokesman for the US embassy in Kabul declined to comment on the Taliban's statement.

Win for the TalibanIn July, the Taliban reportedly met with US officials, including Alice Wells, the senior official for the State Department's Bureau of South and Central Asian Affairs.

Neither side would go on the record to confirm that meeting, but there has been speculation since then that more talks were planned.

The reported July meeting followed an unprecedented ceasefire involving Afghan security forces and the Taliban in June, which fuelled hopes that fighting could be brought to an end after 17 years.

But a wave of attacks by the Taliban and the Islamic State group in recent months has poured cold water on the nascent optimism for peace.

The Taliban's decision to issue a statement on the meeting suggests it sees the talks with Khalilzad as a propaganda win, analysts said.

The group has long called for bilateral talks with the United States, but Washington has repeatedly refused, insisting the process must be Afghan-led.

But under pressure to break the impasse with the group, Washington appeared to change tack in June when US Secretary of State Mike Pompeo said his country was prepared to "participate" in talks.

"The meeting is a success for (the) Taliban. They were demanding to directly meet with the US for a long time and they finally got it," said Afghan political analyst Atta Noori.

"Although they have not agreed on anything... they could bypass the Afghan government."

The Taliban statement was issued as Khalilzad returned to Kabul after a regional trip that began with his first visit to Afghanistan since his appointment last month as US envoy.

On Monday, he met with Afghan President Ashraf Ghani and other senior leaders in Kabul.

On the same day, the Taliban issued a statement vowing to target government security forces in upcoming parliamentary elections, which the United States is helping to finance.

Afghan-born Khalilzad, a former US ambassador to Kabul, Baghdad and the United Nations, is known as a blunt negotiator with hawkish foreign policy views.

Fluent in Pashto and Dari, Khalilzad's experience as a foreign policy operative in the country dates back to the 1980s, when he served as an adviser to the Reagan administration.

(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)