The Trump administration is weighing a phased withdrawal of U.S. troops from Afghanistan if the Taliban meet certain conditions, including agreeing to a ceasefire and entering into peace talks with the Afghan government, U.S. and Western officials told NBC News.

The tentative plan would involve initially pulling out nearly half of the current 14,000-strong force if the Taliban make good on key commitments, two U.S. defense officials and a Western official said. That would involve withdrawing mainly troops assigned to the training and advising mission, the officials said.

But that scenario will hinge on the outcome of crucial talks starting this weekend in Doha, the latest in a series of face-to-face meetings between U.S. presidential envoy Zalmay Khalilzad and Taliban representatives. The Washington Post first reported the troop withdrawal plans.

President Donald Trump has made clear he wants to end the U.S. troop presence in Afghanistan, and Secretary of State Mike Pompeo on Monday said he had orders to scale back American forces by the 2020 election.

When asked about Afghanistan on Friday, Trump suggested he was scaling back the U.S. footprint. "With respect to Afghanistan, we've made a lot of progress. We're talking, but we've also made a lot of progress. We're reducing it."

Administration officials, however, said that no orders had been issued to begin pulling troops out.

The Department of Defense "has not been ordered to draw down" in Afghanistan, said Pentagon spokesperson Navy CDR. Rebecca Rebarich.

Members of Afghan delegations gather during the second day of the Intra Afghan Dialogue talks in the Qatari capital Doha on July 8, 2019. Karim Jaafar / AFP - Getty Images file

"Our strategy in Afghanistan is conditions-based; our troops will remain in Afghanistan at appropriate levels so long as their presence is required to safeguard U.S. interests," she said.

A State Department spokesperson said that "we have not adjusted our troop levels in Afghanistan to reflect our discussions with either the Afghan government of the Taliban."

Khalilzad, who has moved at a frenetic pace to broker a deal, projected unprecedented optimism this week on the state of the talks, saying a U.S.-Taliban deal was within reach. "In Doha, if the Taliban do their part, we will do ours, and conclude the agreement we have been working on," he tweeted.

After 10 days of talks in Kabul, the U.S. diplomat said he just had "my most productive visit to #Afghanistan since I took this job."

But Khalilzad has divulged only the broad outlines of his diplomacy and there are key questions that remain unanswered, prompting fears in Kabul that the United States could make too many concessions in a rush to exit the country. Perhaps the biggest question hanging over the talks is whether the country's elections will go ahead as planned in September or be scrapped in favor of an interim government that would rule until a peace treaty is hammered out with the insurgents.

The deal under discussion would see the United States withdraw troops from Afghanistan by a specific deadline after 18 years of war, in return for the Taliban promising not to allow the country to be a staging ground for terrorist groups, agreeing to a ceasefire and sitting down for peace talks with the Afghan government and other political figures.

If the deal is clinched, it could open the door to an eventual peace settlement while allowing the United States to pull out its troops. Khalilzad insists the deal would not be a "withdrawal agreement" and would be tied to the Taliban meeting verifiable commitments.

While in Kabul over the past week, Khalilzad pressed Afghan President Ashraf Ghani to form a negotiating team that would be ready to enter into talks with the Taliban. Ghani has come around to the idea that the team must be inclusive of a broad political spectrum and include figures outside the government and from civil society, Western officials said.

The Afghan government said Wednesday it had appointed a 15-member delegation to hold direct talks with the Taliban. If the U.S. and the Taliban come to an agreement in coming days, the "intra-Afghan" negotiations could start later this month, Afghan and Western officials said.

The talks will likely be held in a third country, with Oslo, Norway as a possible venue, Western and former U.S. officials said.

Under one option under discussion, Khalilzad would act as the mediator for the first round of the talks, a Western official and a former U.S. official told NBC News. The U.S. envoy could oversee talks until the two sides worked out an initial framework for the negotiation, or what the American diplomat calls a "road map for peace," the sources said.

As a U.S. representative, Khalilzad, would be an unorthodox choice to mediate peace talks, given that Washington has been aligned with the Afghan government on the battlefield.

A former ambassador to Afghanistan under the Bush administration, who speaks both Pashto and Dari, Khalilzad once promoted ambitious plans to build democracy in the country while vanquishing the Taliban.

Now he is racing to broker a peace deal for a president who is openly impatient with America's longest war, and he has had a strained relationship at times with the Afghan government as a result.

A top Afghan government official, Hamdullah Mohib, accused Khalilzad in March of shutting out the Kabul government and betraying the trust of a close ally.

"We don't know what's going on. We don't have the kind of transparency that we should have," Mohib said.

But Roya Rahmani, Afghanistan's ambassador to Washington, said communication and coordination between the administration and the Afghan government had progressed compared to several months ago.

"I believe it has substantially improved," Rahmani told NBC News.

Skeptics of the administration's approach, including prominent Afghan figures and some former U.S. officials, worry that the United States is giving up its leverage by signaling its readiness to withdraw troops even without a full peace settlement in place. The Taliban has yet to make any firm commitment to holding elections or to preserve the civil rights that have been granted — including education for girls — that followed the U.S.-led intervention in 2001, they say.

"If the deal between the Taliban and Washington is to hold, Trump must signal that he would send back the troops if the Taliban breaks their end of the deal," commentator Fareed Zakaria wrote in the Washington Post on Thursday.