President Trump announced in a tweet on Sunday that Defense Secretary James Mattis will leave the administration at the first of the year instead of at the end of February as had been planned.

“I am pleased to announce that our very talented Deputy Secretary of Defense, Patrick Shanahan, will assume the title of Acting Secretary of Defense starting January 1, 2019. Patrick has a long list of accomplishments while serving as Deputy, & previously Boeing. He will be great!,” Trump wrote.

Mattis, a former Marine general, resigned in a letter that rebuked Trump for withdrawing the 2,000 US troops from Syria and for failing to properly manage the relationships with key US allies while not being forceful enough with adversaries like China and Russia.

Following his Twitter announcement on Mattis’ replacement, Trump returned to the platform moments later to say he had a conversation with Turkey’s president Recep Tayyip Erdogan about the troop withdrawal in Syria.

“I just had a long and productive call with President @RT_Erdogan of Turkey. We discussed ISIS, our mutual involvement in Syria, & the slow & highly coordinated pullout of U.S. troops from the area. After many years they are coming home,” Trump posted. “We also discussed heavily expanded Trade.”

Critics of Trump’s decision to pull the 2,000 US troops from Syria say it could result in Turkey massacring the thousands of Syrian Kurdish fighters who were part of the US-backed coalition battling the Islamic State.

The Kurds, who were instrumental in the fight against ISIS, are considered by Turkey to be a terrorist group.

Erdogan said last week that he would postpone a military operation against the Kurds in Syria after Trump’s announcement.

But on Sunday, Reuters reported that Turkey was reinforcing its troops along the border it shares with Syria by mobilizing tanks, heavy artillery and busloads of commandos.