DOHA - The US and the Taliban have resolved differences in peace talks over US troop withdrawal from Afghanistan, as well as over insurgent guarantees on cutting ties with other extremist groups, a Taliban official said Tuesday.

The development came during US-Taliban talks over the past two days in the Gulf Arab state of Qatar, where the Taliban maintain a political office.

The US side did not immediately confirm or provide details of what was resolved but the US envoy reported “excellent progress” in the talks.

The Taliban official spoke on condition of anonymity because he was not authorised to discuss details of the negotiations.

Technical teams from the two sides were continuing discussions on Tuesday in Doha.

US peace envoy Zalmay Khalilzad, who has been tasked with finding a peaceful resolution to the nearly 18-year war, America’s longest conflict, has made intra-Afghan talks and a permanent ceasefire among his priorities in the negotiations.

Khalilzad, who later travelled to New Delhi, said in a Twitter post overnight that “we have made excellent progress” in the discussions.

In New Zealand, NATO Secretary General Jens Stoltenberg said on August 6, “We now see a real chance for peace in Afghanistan; we are closer to a peace deal than ever before.”

However, the talks in Qatar have sidelined the government in Kabul.

The Taliban refuse to talk directly with government representatives, accusing President Ashraf Ghani’s government of being a puppet of the US.

The Taliban have kept up a near-daily rate of deadly attacks, despite holding several rounds of peace talks with Khalilzad since his appointment as peace envoy almost a year ago. The Taliban now control roughly half of Afghanistan and are at their strongest since 2001, when the US-led invasion toppled their government that had harboured Al-Qaeda leader Osama bin Laden.

The US and the Taliban now appear to be closing in on an agreement under which US forces would withdraw in exchange for guarantees that Afghanistan would not become a haven for other terrorist groups.

Khalilzad has said he is hoping for a final agreement by September 1, which would allow the withdrawal of US and NATO troops. More than 20,000 US and NATO troops are in Afghanistan, including some 14,000 US forces.

Also on Tuesday, the Taliban in a statement called on fellow Afghans to boycott next month’s presidential election.

The Taliban called the Sept 28 election, which has been delayed this year over security and organizational concerns, a “sham.” Ghani, who is seeking a second term in office, is among the more than a dozen candidates running in the polls.

Afghanistan’s thrice-delayed presidential election — originally scheduled for April 20, then pushed to July 20 — is now set for September 28. The Taliban have called the election a “sham,” urged Afghans to boycott the polls, and warned that those attending rallies “could become potential targets.”

The US and NATO formally concluded their combat mission in 2014, but the American and allied troops continue to train and build the Afghan military. Separately, US forces also assist the Afghan troops in airstrikes and raids on the Taliban and against Daesh’s affiliate in Afghanistan.

President Donald Trump has often expressed his exasperation with America’s continued involvement in Afghanistan and his desire to bring troops home.