Zalmay Khalilzad is likely not a happy man right now.

Khalilzad, the US special envoy for Afghanistan reconciliation, had been on an urgent mission: Launch a peace process with the Taliban, and launch it soon. With US President Donald Trump eager to wind down the war, Washington has been eager to get a deal to give the president cover for a withdrawal.

Khalilzad had made some progress. He facilitated several high-level meetings between senior US officials and Taliban representatives. The most encouraging exchange occurred in the UAE earlier this month.

“They told me we cannot defeat you,” Khalilzad said in an interview with the Afghan TV station Tolo News shortly after the UAE talks, referring to the Taliban. The insurgents told him that “we should first sit with you, which means the US, then with Afghans, and resolve the issues through political means.” Given that the Taliban representation included the head of its political office and chief of staff to supreme leader Mullah Akhundzada, such a conciliatory message is nothing to sneeze at.

And then, like a bolt from the blue, Khalilzad’s boss pulled the rug out from under him. Trump abruptly decided to withdraw nearly half of the 14,000-strong US troops in Afghanistan.

This move makes Khalilzad’s job much more difficult, as Washington seems to have lost ample leverage in future talks.

Trump squandered a precious opportunity

The US president has given the Taliban what they’ve long demanded – a commitment to withdraw troops – and they didn’t need to give up anything in return, much less conclude a deal. For the Taliban, the withdrawal decision is manna from heaven. For US negotiators, it’s a punch to the gut.

Getting the Taliban to agree to formal talks was a hard-enough sell before Trump’s decision. The insurgents, who have pushed back hard against beleaguered Afghan forces and hold more territory than at any time since the 2001 US-led invasion, had little reason to stop fighting.

The Taliban has previously said it may be open to formal talks with the Afghan government to end the war once Washington commits to troop withdrawals. So why not view Trump’s decision as an opening to launch a peace process?

Unfortunately, so long as Afghanistan‘s current government remains in power, that’s likely not in the cards. Even with a troop drawdown plan, the Taliban won’t be itching to talk to the current Afghan government.

Ever since US forces expelled the Taliban from power in 2001, the group has denounced Afghan governments as illegitimate and puppets of Washington. The Taliban would argue that such crude characterisations apply particularly well to the present administration – a national unity government that is the product of a US-led negotiation, not an election.

After Afghanistan’s 2014 presidential election ended inconclusively, US Secretary of State John Kerry was dispatched to Kabul, where he hammered out a power-sharing deal between the two top vote-getters, Ashraf Ghani and Abdullah Abdullah. These two men lead the current government.

So when Taliban statements, such as the one released in November, refer to the Afghan government as “installed by the Americans and imposed on the Muslim Afghan nation,” they’re not off the mark.

Ultimately, Trump’s unilateral drawdown decision may have squandered Washington’s best chance to date to launch peace talks. The Taliban is poised to capitalise on the new battlefield advantage generated by a drawdown unaccompanied by a peace deal, and to step up its fight against a government to which it has no interest in talking.

What are Washington’s options now?

Ideally, Trump would walk back his drawdown decision and give Khalilzad’s diplomatic efforts more time. It’s easier to justify a withdrawal if you can say that at least you tried to make peace first.

Realistically, Trump is unlikely to change course; he’s never been comfortable remaining in Afghanistan. Additionally, the White House – especially with the impending departure of Defense Secretary James Mattis – has few remaining senior officials who support staying the course and are in a position to convince Trump to change his mind, or even to slow down the pace of the drawdown. Trump could well announce a full withdrawal in the coming months.

So what can Washington do to pick up the pieces of a shattered opportunity?

The first step is damage control. Top US officials should assure Kabul that despite imminent troop reductions, they aren’t abandoning Afghanistan. Washington should emphasise that it will continue to provide critical funding to Afghan security forces and to support efforts to expand the Afghan Special Forces, the crown jewel of Afghanistan’s army which is badly suffering from overexertion.

Such measures can ease Afghan concerns about US abandonment and limit the Taliban’s potential battlefield gains following US troop departures.

Second, if and when contacts with the Taliban resume, Washington should focus on getting the Taliban to formally renounce ties with al-Qaeda. Analysts have long feared that Afghanistan will revert to an international terrorism sanctuary in the event of a US withdrawal, and this fear may be one reason why a reluctant Trump agreed to keep troops in the country when he announced his Afghanistan strategy last year.

The same fear also drives the US negotiating strategy. In his Tolo News interview, Khalilzad said, “If the menace of terrorism is tackled, the United States is not looking for a permanent military presence in Afghanistan.” The Taliban is actively fighting a local affiliate of the Islamic State of Iraq and the Levant (ISIL, also known as ISIS), but it retains ties to al-Qaeda.

Here is where Pakistan can be helpful. Washington should press Islamabad, which enjoys extensive influence over the insurgents, to take up the al-Qaeda issue with the Taliban, and to enlist key regional actors Russia, Iran, and China in this campaign, as well. These four countries don’t get along with Washington, but they also have no interest in Afghanistan reverting to an al-Qaeda sanctuary.

There may be an opening. Tricia Bacon, a scholar who studies alliances between terror groups, has written that the Taliban is not as dependent on the operational and financial support it used to receive from al-Qaeda, while al-Qaeda leader Ayman al-Zawahiri enjoys less standing within the Taliban than did his predecessor, Osama bin Laden.

Third, Washington should extend its full backing to Afghan presidential elections scheduled for next year. Given security, technological, and logistical challenges, the poll will likely be flawed, but the chances of the Taliban talking to Kabul – and by extension, launching formal talks – are higher if Afghanistan’s leadership is the product of an election, warts and all, rather than an external US-led meditation.

In recent days, Afghan election officials have indicated the poll will be postponed by several months to fix technical glitches. In the best-case scenario, the delay would not only fix problems in the election process and make it more credible, but it would also allow for more time to build a blueprint for peace talks with the Taliban to begin once the new government takes office.

Amid a suddenly receding US role and presence in Afghanistan, Kabul’s participation in a potential peace process has never been more critical. Khalilzad can limit the damage of his boss’s rash decision by helping create the right conditions for an eventual launch of an Afghan-led, Afghan-owned peace process that Afghanistan and its long-suffering citizenry richly deserve.

The views expressed in this article are the author’s own and do not necessarily reflect Al Jazeera’s editorial stance.