Image copyright AFP Image caption The US has about 14,000 troops in Afghanistan and is part of a Nato mission there

The US and the Afghan Taliban have made "significant progress" in talks aimed at ending the 17-year-old conflict in Afghanistan, the US envoy has said.

In a series of tweets, Zalmay Khalilzad did not give details but said the unprecedented six days of talks in Qatar were "more productive than they have been in the past".

He said he was on his way to Kabul to consult Afghan government officials.

The Taliban also said progress had been made in the negotiations.

However, a spokesman added that talks about "unsolved matters" would continue.

Mr Khalilzad also emphasised that talks with the Taliban would continue and that nothing had been finalised.

Skip Twitter post by @US4AfghanPeace 2/3. Will build on the momentum and resume talks shortly. We have a number of issues left to work out. Nothing is agreed until everything is agreed, and “everything” must include an intra-Afghan dialogue and comprehensive ceasefire. — U.S. Special Representative Zalmay Khalilzad (@US4AfghanPeace) January 26, 2019 Report

The Taliban have so far refused to hold direct talks with Afghan officials, whom they dismiss as "puppets".

They say they will only begin negotiations with the government once a firm date for the withdrawal of US troops has been agreed.

Earlier on Saturday, Taliban sources quoted by Reuters said the two sides had finalised clauses to be included in a draft agreement.

They envisaged foreign forces withdrawing within 18 months of the deal being signed in return for assurances that al-Qaeda and the Islamic State (IS) group would not be allowed to use Afghanistan as a base to attack the US.

The two sides have also found agreement on other sticking points including the exchange of prisoners and the lifting of travel bans on some Taliban leaders, Reuters reported.

The Taliban's power and reach have surged since foreign combat troops left Afghanistan in 2014.

On Friday, Afghan President Ashraf Ghani said more than 45,000 members of the country's security forces had been killed since he became leader in 2014.

It is estimated that about 15 million people - half the Afghan population - are living in areas either controlled by the Taliban or where the militants are openly present and regularly mount attacks.

Is a ceasefire on the horizon?

Analysis by Secunder Kermani, BBC Afghanistan correspondent

The simple fact that there have been six days of talks between the two sides is significant - and shows how serious both are about trying to find a peaceful solution to this conflict.

It seems there has been progress in discussions about the Taliban's key demand - American troop withdrawal - though no timetable has yet been given. In return, the Taliban appear to be willing to give guarantees about not allowing Afghanistan to become a base for international jihadists.

However, this is a position the group has articulated for some time now, and it remains to be seen what other concessions they might be willing to make. The key question for many ordinary Afghans is whether a ceasefire might be on the horizon? That would provide much needed relief to a war weary population.

At the moment the focus is on ending the violence - and getting the Taliban face-to-face with the Afghan government. But it's after that that even more delicate negotiations may have to take place - about the role of women's rights, freedom of the press and democracy in Afghanistan.

Mr Ghani has previously said that the Taliban could be recognised as a political party if they accepted a ceasefire and recognised the country's constitution.

Image copyright AFP Image caption Zalmay Khalilzad is the US special representative for Afghanistan reconciliation

In December, reports emerged that the US was planning to withdraw about 7,000 troops - roughly half the remaining US military presence in the country.

Analysts warned that such a withdrawal could offer the Taliban a propaganda victory.

Who are the Taliban?

The Taliban emerged in the early 1990s following the withdrawal of Soviet troops from Afghanistan, shortly before the demise of the Soviet Union.

Image copyright AFP Image caption Afghan security forces escorting alleged Taliban fighters

The militants ruled Afghanistan from 1996 to 2001, imposing a brutal version of Sharia law that included public executions and amputations, and the banning of women from public life.

They were driven from power by US-led troops following the 9/11 attacks which Washington blamed on al-Qaeda militants sheltered by the Taliban.