U.S. special representative for Afghanistan, Zalmay Khalilzad (L), shakes hands with Afghanistan's Chief Executive Abdullah Abdullah in Kabul, Afghanistan September 2, 2019. AFGHAN CHIEF EXECUTIVE OFFICE

Kabul, Afghanistan — A U.S. envoy showed the draft of a U.S.-Taliban agreement to Afghan leaders on Monday after declaring they were "at the threshold" of a deal to end America's longest war, officials said. However, reflecting the sensitivity of the U.S.-Taliban negotiations and the Afghan government's sidelined role in the talks so far, it was not clear whether the draft was actually given to President Ashraf Ghani and his team.

Envoy Zalmay Khalilzad met twice with Ghani after arriving Sunday evening from Qatar, where the ninth round of U.S.-Taliban talks ended without a final agreement.

"We have reached an agreement with the Taliban in principle but of course until the U.S. president agrees with it, it isn't final," Khalilzad told the local TOLO news channel. He said that under the deal, 5,000 U.S. troops would withdraw within 135 days from five bases in Afghanistan. Between 14,000 and 13,000 troops are currently in the country.

Get Breaking News Delivered to Your Inbox

President Donald Trump last week told Fox News the U.S. plans to reduce its troop presence to 8,600 and then "make a determination from there." He has been eager to withdraw troops before next year's election and the draft deal easily meets that deadline.

Afghan presidential spokesman Sediq Seddiqi told reporters the government would study the deal to make sure it addresses the goals of a lasting cease fire and direct talks with the Taliban in the near future. "It will take couple of days, probably, that we will get back to them and give them our observations," he said.

A deal on ending nearly 18 years of fighting is closer to reality, even as the Taliban attacked the capitals of Kunduz and Baghlan provinces in the north over the weekend. Violence continued in Kunduz on Monday as a suicide bomber targeted a police checkpoint and killed at least four officers and wounded 17 people, including 10 civilians, said provincial health director Esanullah Fazeli.

The Afghan government has been shut out of the U.S.-Taliban negotiations, as the militant group dismisses it as a U.S. puppet, but intra-Afghan talks that include the government are meant to follow a U.S.-Taliban deal.

The Kabul government says its negotiating team is ready but refuses to say who is on it.

The Taliban are at their strongest since the U.S.-led invasion to topple their government after the Sept. 11, 2001 attacks on the United States, and now controls or holds sway over roughly half the country. The insurgents want all of the estimated 20,000 U.S. and NATO forces to leave Afghanistan and already portray their departure as the insurgents' victory.

"We are on the verge of ending the invasion and reaching a peaceful solution for Afghanistan," the Taliban spokesman in Qatar, Suhail Shaheen, said over the weekend.

For its part, the U.S. seeks Taliban assurances that Afghanistan will not be a safe haven for extremist groups to plan and launch global terror attacks.

The militant group has stepped up attacks in recent months to strengthen its negotiating position. The United Nations and others say civilians have suffered, often caught in the crossfire as government forces, backed by the U.S., have pursued the militants with airstrikes and raids. Afghanistan was the world's deadliest conflict in 2018.

A U.S. official with Khalilzad's negotiation team recently said that "any potential peace deal will not be based on blind trust, but will instead contain clear commitments that are subject to our monitoring and verification." The official spoke on condition of anonymity because they were not authorized to discuss the matter with the media.

The official added that a deal would lead to "intra-Afghan negotiations where the Taliban will sit with other Afghans and together they will commit to a permanent and comprehensive ceasefire."

Unrest continued Monday outside Baghlan's capital city, Puli Khumri, as the Taliban blocked the main road leading south to Kabul with fuel tanker trucks, opening fire on any security forces that tried to approach, provincial council member Mabobullah Ghafari told The Associated Press.

The Taliban also blocked the two main highways heading north from Puli Khumri as gun battles continued, he said.

The interior ministry said at least 51 Taliban fighters, seven civilians and six members of security forces had been killed, and that the Taliban would soon be eliminated from the area.