President Donald Trump responded to criticism from his former Chief of Staff Gen. John Kelly on Thursday.

“He came in with a bang, went out with a whimper, but like so many X’s, he misses the action & just can’t keep his mouth shut, which he actually has a military and legal obligation to do,” Trump wrote on Twitter.

Kelly was Trump’s chief of staff for 18 months before exiting the position, after months of trying to control the president’s instincts.

In a speech to students at Drew University on Wednesday, Kelly defended Lt. Col. Alexander Vindman after the president fired him, criticized the president’s remarks on immigrants, criticized his decision to intervene on behalf of Navy SEAL Eddie Gallagher, and criticized Trump’s interactions with the press, Kim Jong-un, and Russian President Vladimir Putin.

Trump was angered by Kelly’s remarks after cable news spent most of Thursday morning focusing on the report of the speech from The Atlantic.

“When I terminated John Kelly, which I couldn’t do fast enough, he knew full well that he was way over his head,” Trump wrote. “Being Chief of Staff just wasn’t for him.”

When I terminated John Kelly, which I couldn’t do fast enough, he knew full well that he was way over his head. Being Chief of Staff just wasn’t for him. He came in with a bang, went out with a whimper, but like so many X’s, he misses the action & just can’t keep his mouth shut,. — Donald J. Trump (@realDonaldTrump) February 13, 2020

Trump recalled a moment he had with Kelly’s wife, Karen, who promised the president that they would speak positively about him.

“His incredible wife, Karen, who I have a lot of respect for, once pulled me aside & said strongly that ‘John respects you greatly. When we are no longer here, he will only speak well of you,’” Trump recalled. “Wrong!”

This is not the first time that Kelly has criticized Trump since leaving his position.

In October, Kelly admitted that he had “second thoughts” about leaving the White House.

“It pains me to see what’s going on because I believe if I was still there or someone like me was there, he would not be, kind of, all over the place,” he said.

A former Marine general, Kelly frequently appeared to resent the chief of staff position, describing it as “bone-crushing hard” and “the least enjoyable job” he ever had.