The Pentagon is preparing to withdraw thousands of troops from Afghanistan as part of a proposed peace deal with the Taliban, U.S. officials told Fox News Thursday.

One official warned the withdrawal would be subject to the completion of any agreement. So far, no such deal has been finalized.

The Trump administration has undertaken eight rounds of negotiations with the Taliban, which controlled Afghanistan between 1996 and 2001, led by envoy Zalmay Khalilzad, the Afghan-born former U.S. ambassador to Kabul. Khalilzad has hinted that a peace agreement could be reached in the next round of talks, scheduled to be held in Qatar later this week.

"In Doha, if the Taliban do their part, we will do ours, and conclude the agreement we have been working on," he tweeted Wednesday, adding that he was, "Wrapping up my most productive visit to #Afghanistan since I took this job as Special Rep."

The agreement would require the Taliban to broker a peace deal directly with the Afghan government, and give assurances the country won't be used as a launch-pad for international terror attacks. However, some officials have concerns about how to hold the group accountable. The Washington Post reported that if finalized, the agreement would cut the number of troops in the country from 14,000 to between 8,000 and 9,000.

In an interview with Fox News' Tucker Carlson last month, Trump said the U.S. had already cut the number of forces down to 9,000 from the current 14,000. By comparison, there were 100,000 U.S. troops in Afghanistan.

"I have pulled a lot out," Trump said. "We were at 16,000. We're down to about 9,000, which a lot of people don't know ... "

In the same interview, the president also expressed frustration with the cost of rebuilding Afghanistan since the 2001 NATO invasion following the 9/11 attacks.

"With Afghanistan, it's 19 years and we should not have been there 19 years and if we were, you know, it would be nice to fight to win," he said. "But it's just 19 years. They're building hotels -- we are. I mean, we had a Holiday Inn that cost numbers that would be 10 times what it should have cost."

The Taliban have refused to recognize the Kabul government, viewing it as an American puppet. The insurgents effectively control around half the country and continue to carry out daily attacks on Afghan security forces.

As a result, the Afghan National Security and Defense Forces are losing troops at the fastest rate in years, according to Washington's watchdog on the billions of dollars the U.S. spends in Afghanistan. For the fourth quarter in a row, Afghan troop levels were at their lowest levels since 2015, when the U.S. and NATO Resolute Support mission began, according to the quarterly report from the Special Inspector General for Afghan Reconstruction.

The U.S. has lost more than 2,400 soldiers in its longest war and has spent more than $900 billion on everything from military operations to the construction of roads, bridges and power plants.

Khalilzad has held a series of meetings with Pakistani and Afghan officials over the past several months to brief them about the outcome of his meetings with the Taliban, who are talking to prominent Afghans in Kabul.

The most recent such talks among Afghans were held in July in Doha. The Taliban have said that once reach an agreement with the U.S., they would be open to intra-Afghan talks, but any government representatives would have to participate in a personal capacity.

Fox News' Lucas Tomlinson and The Associated Press contributed to this report.