President Trump denounced former Defense Secretary Jim Mattis on Wednesday, saying at a Cabinet meeting he "essentially" fired the former Marine Corps general from the top Pentagon post.

"What's he done for me? How had he done in Afghanistan? Not too good," Trump said. "As you know, President Obama fired him, and essentially so did I. I want results."

The meeting was attended by Mattis' replacement, acting Defense Secretary Patrick Shanahan.

Mattis announced Dec. 20 that he intended to resign, effective Feb. 28. His departure was hastened after Mattis publicly released his resignation letter, citing differences with Trump on "treating allies with respect and also being clear-eyed about both malign actors and strategic competitors."

On the evening of Mattis' resignation announcement, White House press secretary Sarah Sanders told reporters Trump and Mattis had "a good relationship" and that Trump did not ask for Mattis' resignation "that I know of."

Mattis' resignation closely followed Trump's decision to withdraw about 2,000 U.S. troops from Syria, where they mostly worked with a Kurdish-led military alliance, and to reduce the number of U.S. troops in Afghanistan.

"Syria was lost long ago," Trump said at the Cabinet meeting. "We are talking about sand and death. We are not taking about vast wealth."

Trump brandished a letter from North Korean leader Kim Jong Un at the gathering, saying the men would meet soon for a second summit. If they had not met for a June summit in Singapore, there would have been "a big fat war in Asia," Trump said.