A U.S. plan to help end the war in Afghanistan would see all U.S. forces leave the war-torn country within five years, according to a report published Thursday.

The Pentagon's plan envisions the timeline for the U.S. withdrawal to be as little as three years, according to The New York Times, which received elements of the proposal from American and European officials.

It is currently under discussion with European allies and would see the U.S.'s 14,000 troops in the Central Asian country reduced by half within a matter of months.

American forces who remain after the drawdown would largely be tasked with carrying out counterterrorism operations, and the plan would shift responsibility for training Afghan forces to the roughly 8,600 European and Australian forces stationed in the country.

Even if ongoing peace talks with the Taliban break down, the U.S. would shift away from training to focus on counterterrorism operations, officials told the Times.

American forces would continue to carry out strikes against Daesh and al-Qaeda under the plan and would conduct joint raids with Afghan forces.

The counterterror operations, the Times noted, are critical to allowing the CIA to continue to operate in Afghanistan.

The plan has been widely accepted in Washington and within NATO, but American officials warned the Times it could be upended at any moment by President Donald Trump.

The president has repeatedly taken issue with prolonged wars and has said he wants to end the war in Afghanistan, which is the U.S.'s longest at over 17 years.

The highest-level negotiations to date between the U.S. and the Taliban began Monday in Qatar before pausing Wednesday. They are set to resume Saturday.

The Afghan government has not been a direct party to the talks because of Taliban opposition to engage in talks with the government.