Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — The United States and the Taliban now have a draft agreement on two thorny issues that signals concrete progress toward a peace deal to end the 17-year-old war in Afghanistan, U.S. presidential envoy Zalmay Khalilzad said Tuesday.

After two weeks of talks in the Qatari capital of Doha, the top U.S. diplomat overseeing negotiations with the Taliban said the two sides have hammered out a draft agreement on the eventual withdrawal of U.S. troops from Afghanistan and a commitment from the insurgents to cut all ties with al Qaeda or other terrorist groups.

"Peace requires agreement on four issues: counter-terrorism assurances, troop withdrawal, intra-Afghan dialogue, and a comprehensive ceasefire," Khalilzad said in a series of tweets.

Qatari officials take part in meeting between U.S. special envoy Zalmay Khalilzad, the U.S. delegation, Sher Mohammad Abbas Stanikzai and the Taliban delegation, in Doha on on Feb. 26, 2019. Qatar's Ministry of Foreign Affairs / via AFP - Getty Images

"In January talks, we 'agreed in principle' on these four elements. We're now "agreed in draft" on the first two," the U.S. diplomat wrote, referring to promises from the Taliban to sever links to terrorists and from the U.S. to pull out American forces.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

When the draft agreement on the two issues is finalized, the Taliban and the Afghan government — as well as other Afghan representatives — "will begin intra-Afghan negotiations on a political settlement and comprehensive ceasefire," he tweeted.

Khalilzad said the talks had produced genuine progress.

(2/4) Peace requires agreement on four issues: counter-terrorism assurances, troop withdrawal, intra-Afghan dialogue, and a comprehensive ceasefire. In January talks, we "agreed in principle" on these four elements. We're now "agreed in draft" on the first two. — U.S. Special Representative Zalmay Khalilzad (@US4AfghanPeace) March 12, 2019

"Just finished a marathon round of talks with the Taliban in #Doha. The conditions for #peace have improved. It's clear all sides want to end the war. Despite ups and downs, we kept things on track and made real strides," he wrote.

He said his next step would be "discussions in Washington and consultations with other partners," and added: "We will meet again soon, and there is no final agreement until everything is agreed."

The talks between the Taliban insurgents and U.S. diplomats have lasted longer than any previous American attempt at negotiation with the militants since American troops entered Afghanistan in 2001. But it's unclear if the Afghan government and other Afghan political leaders will be ready to embrace the tentative deal worked out by Khalilzad.

Afghan President Ashraf Ghani has expressed concerns that the Kabul government could be left out in the cold unless the Taliban agrees to meet face-to-face with his government.

In its own statement, the Taliban said "progress was achieved" on both of the issues cited by Khalilzad. And the militants said there was no agreement on a ceasefire or on direct discussions with 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 Taliban statement said.

The Taliban have long rejected any talks with the Afghan government, which it dismisses as a puppet of Washington. Until President Donald Trump appointed Khalilzad as envoy, the U.S. had been reluctant to plunge into extended talks with the insurgency.

(4/4) My next step is discussions in Washington and consultations with other partners. We will meet again soon, and there is no final agreement until everything is agreed. — U.S. Special Representative Zalmay Khalilzad (@US4AfghanPeace) March 12, 2019

Trump has made no secret of his desire to withdraw U.S. troops from Afghanistan, and his impatience has led U.S. diplomats to push for a negotiated end to the war.

The last diplomatic attempt to end the war ended in failure in 2013, amid acrimony between Afghanistan's then-President Hamid Karzai and U.S. officials.