The longest peace talks between the US and the Taliban to end America's 17-year war in Afghanistan concluded Tuesday night in Qatar, with both sides saying progress had been made.

The nearly two weeks of talks produced two draft agreements between the militants and the U.S. government on a “withdrawal timeline and effective counterterrorism measures,” American envoy Zalmay Khalilzad wrote on Twitter.

The diplomat said he'd go to Washington and meet with other concerned parties, likely including the Afghan government, which did not take part in the 13 days of face-to-face talks in Doha, the Qatari capital.

In this handout file photo taken on February 26, 2019 released by the official Qatar's Ministry of Foreign Affairs, Qatari officials (C) take part in meeting between US special envoy Zalmay Khalilzad (2nd-L), the US delegation, Sher Mohammad Abbas Stanikzai (6th-R) and the Taliban delegation, in Doha. — AFP

“The conditions for #peace have improved,” Zalmay wrote. “It's clear all sides want to end the war. Despite ups and downs, we kept things on track and made real strides.”

The Taliban issued their own statement, similarly saying “progress was achieved” on both of those issues. It stressed no cease-fire deal had been reached, nor any agreement for it to speak to the Afghan government.

“For now, both sides will deliberate over the achieved progress, share it with their respective leaderships and prepare for the upcoming meeting, the date of which shall be set by both negotiation teams,” the statement read.

It wasn't immediately clear when the next round of talks would begin.

Also read: Taliban say they are not looking to rule Afghanistan alone

A Taliban official at the talks, who earlier spoke to The Associated Press on condition of anonymity as he was unauthorised to reveal details of the negotiations publicly, said the main sticking point remained when US forces would withdraw. The Taliban want a withdrawal within three to five months, while the US is saying it will take 18 months to two years, he said.

Another sticking point would be a demand from America that the Taliban guarantee Afghanistan would never again host militants that would launch an attack against it. The Taliban have said it can agree to a general promise, but remains unwilling to identify specific groups in its pledge.

Osama bin Laden's successor in Al Qaeda, Ayman al Zawahri, is believed to be hiding in Afghanistan. Scores of other militants from Arab countries, including Yemen and Saudi Arabia, are also believed to be living in Afghanistan.

The Taliban, who refuse to talk with the government in Kabul and describe it as a US puppet, have long demanded direct talks with the US but until Khalilzad's appointment last September, Washington had shied away from opening face-to-face negotiations.

The Taliban, who had harboured Al Qaeda and its leader, bin Laden, ruled Afghanistan before US forces invaded in October 2001, following the 9/11 attacks. The Taliban have made a major comeback in recent years, and today carry out near-daily attacks on Afghan security forces. That has made a peace process even more pressing and President Donald Trump has expressed frustration at the protracted conflict.

Explore: 'We never want to go back': Afghan women fear cost of peace under Taliban

Foreign Minister Shah Mehmood Qureshi said Pakistan has helped push the peace talks, which in turn has helped Islamabad's long-troubled relationship with Washington.

Earlier on Tuesday, Qureshi similarly spoke about the progress being made at the talks.

“Pakistan has encouraged all factions within Afghanistan to sit together and have a meaningful intra-Afghan dialogue,” he said alongside German Foreign Minister Heiko Maas.

The talks have taken place at one of the most luxurious resorts in Qatar, a tiny, energy-rich country that sticks out like a thumb into the Persian Gulf. A glamorous female pianist playing everything from Chopin to Mariah Carey provided a soundtrack to the journalists loitering around the hotel, straining to get any information about the closed-door talks.

The surrealism extended just outside of the doors leading to the talks, where bikini-clad sunbathers by the pool drank alcohol. Mullah Baradar, the co-founder of Taliban, walked in and out of meetings accompanied by his son and Qatari security.

Passing tourists expressed surprise when journalists identified the men walking past in traditional Afghan waist coats, rounded chitrali caps and turbans that had suddenly become part of their vacation.