Afghan security forces personnel are seen at the site of a car bomb attack in Kabul on May 31, 2017. At least 40 people were killed or wounded on May 31 as a massive blast ripped through Kabul’s diplomatic quarter, shattering the morning rush hour and bringing carnage to the streets of the Afghan capital. / AFP PHOTO / SHAH MARAI (Photo credit should read SHAH MARAI/AFP/Getty Images)

This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

WASHINGTON — The US military has been ordered to withdraw about half the troops in Afghanistan, a US defense official with direct knowledge of the matter told CNN on Thursday.

The official said planning is underway, and it could take months to withdraw the nearly 7,000 troops.

The decision was made Tuesday, at the same time as President Donald Trump’s decision to withdraw the US military from Syria — moves that precipitated Defense Secretary James Mattis’ resignation announcement on Thursday.

The Wall Street Journal was first to report the plan for the Afghanistan withdrawal.

Several US defense officials told CNN that Trump wants to draw down US troops in Afghanistan. Two administration officials told CNN that Trump wants the plans drawn up in hopes he could announce the drawdown in his State of the Union speech, which is traditionally at the end of January or early February.

CNN’s Jake Tapper reported earlier Thursday that officials throughout the administration were bracing themselves for Trump to make an announcement about the US presence in Afghanistan.

Multiple officials told CNN the military decisions were a factor in Mattis’ decision to resign.