In this Sunday, July 24, 2016 photo, a U.S. military personal stands guard during a graduation ceremony in Lashkargah, capital of southern Helmand province, Afghanistan. An important district in Afghanistan’s southern poppy-growing province of Helmand has fallen to Taliban control after heavy fighting that killed or wounded up to 20 police officers, an official said on Saturday. (AP Photos/Abdul Khaliq)

DOHA: The United States has agreed to discuss the withdrawal of its troops from Afghanistan in a direct meeting with Taliban representatives in Qatar, officials from the armed group said.

In a preliminary meeting in Doha on Friday, Taliban representatives and US envoy Zalmay Khalilzad discussed the Taliban’s conditions to end the 17-year war in Afghanistan, two top Taliban officials, who spoke on the condition of anonymity, told Al Jazeera.

“Six US delegates arrived in Doha to have a meeting with our (Taliban) leaders [and] agreed to discuss all issues, including the pullout of foreign troops,” one of the officials said.

“But, it was a preliminary meeting and all issues were discussed in general, not in detail,” he added, saying more talks were expected to take place in the near future.

Last year, US President Donald Trump increased the number of US forces in the country as part of a new strategy against the Taliban. There are now about 14,000 US soldiers in the country. The Taliban has previously said the presence of foreign troops was the biggest obstacle to peace in Afghanistan.

In addition to the withdrawal of foreign troops from Afghanistan, the Taliban’s conditions include the lifting of sanctions on its leaders, the release of their fighters imprisoned in Afghanistan, and the establishment of an official political office.

At the request of the US, a Taliban office was established in Doha in 2013 to facilitate peace talks but it was shut shortly after opening when it came under pressure over a flag hung outside the office, the same flag that was flown during the Taliban rule in Afghanistan.

Then Afghan President Hamid Karzai subsequently halted peace efforts, saying the office was presenting itself as an unofficial embassy for a government-in-exile.

The flag has since been taken down and the office has been empty with no official announcements about a possible reopening. Talks with the Taliban have since been taking place elsewhere in Doha.

US officials in Kabul and Zalmay Khalilzad were not immediately available to comment on Saturday’s gathering in the Qatari capital.

It was the second time that US officials met the group in Qatar. The first meeting took place in July, and included US Deputy Assistant Secretary of State Alice Wells.

In recent months, Khalilzad, who was appointed as US Special Representative for Afghanistan Reconciliation in September, has met officials from Pakistan, Afghanistan, Saudi Arabia and the United Arab Emirates in a bid to renew the long-stalled direct talks with the Taliban.

The Taliban, Afghanistan’s largest armed group which was toppled from power by a US-led invasion in 2001, has repeatedly turned down offers of talks with the Afghan government, calling them “US puppets”, despite calls from Afghan President Ashraf Ghani to start negotiations.

Instead, they demanded to meet US officials for talks primarily on foreign troops withdrawal. In July, the US announced it was ready for direct talks with the Taliban to seek negotiations and to “discuss the role of international forces”.

Abdul Salam Zaeef, a former Taliban ambassador to Pakistan who is now based in Doha and in contact with the Taliban representatives, confirmed the US decision to discuss a pullout from Afghanistan.

He was not present at the meeting, but said the withdrawal of foreign troops “now only requires a timeline for implementation”.

“As per my information, the US has reached an agreement with the Taliban to withdraw troops from Afghanistan but the US officials have not yet agreed on a date,” he said.

“The US is not winning in Afghanistan. They are aware of that, which means they have to agree on the Taliban’s conditions for ending the war in the country.”

Some analysts, however, fear the withdrawal of foreign troops will not end the long-running conflict in Afghanistan.