United States Secretary of Defense James Mattis will be retiring at the end of February, President Donald Trump said in a surprise announcement via Twitter.

The Pentagon released Mattis’ resignation letter, in which the top defense official indicated he is leaving because of fundamental disagreements on security issues.

“My views on treating allies with respect and also being clear-eyed about both malign actors and strategic competitors are strongly held and informed by over four decades of immersion in these issues,” the secretary wrote.

“Because you have the right to have a secretary of defense whose views are better aligned with yours on these and other subjects, I believe it is right for me to step down from my position,” he went on.

While reported tensions between Mattis and Trump have led to speculation that his days were numbered, the abrupt timing comes as the US president handles complex negotiations on budget legislation ahead of the Christmas holiday.

It also comes after the president’s announcement that the US will withdraw all troops from Syria, a decision that his cabinet, including Mattis, did not support.

Read Mattis’ full resignation letter.