Rex Tillerson is officially done as secretary of state, but he got in what appeared to be one final dig at President Trump before heading out the door.

At the very end of his farewell speech to the State Department on Thursday, Tillerson talked about the importance of maintaining your integrity and having respect for others. Then he turned to politics.

“This can be a very mean-spirited town,” he said, drawing knowing laughs and a round of applause, “but you don't have to choose to participate in that. Each of us get to choose the person we want to be, and the way we want to be treated, and the way we will treat others.”

It's virtually impossible not to connect these comments to Tillerson's ouster. He was fired via tweet, and the No. 4 official at the State Department said Tillerson wasn't given any advance notice. Then, in a closed-door meeting last week, White House Chief of Staff John F. Kelly reportedly told staffers that Tillerson received the news of his impending exit while using the toilet. Kelly has drawn plenty of criticism for disclosing that, even privately.

The entire episode has reinforced the fact that going to work in the Trump administration often means checking your pride at the door. But Tillerson has seemed to be particularly shaken up by the whole thing — including in a brief statement to the press after his firing last week in which his voice was noticeably quavering. Tillerson had reportedly felt he was hitting his stride as secretary of state just before he was fired.

Trump also repeatedly contradicted things Tillerson had said, including about whether meeting with North Korean leader Kim Jong Un was wise (Trump announced the meeting within hours of Tillerson arguing it wasn't prudent) and, more broadly, about whether talking to the North Koreans was a good idea. He suggested publicly that Tillerson was wasting his time. “Save your energy, Rex,” Trump tweeted. “We’ll do what has to be done.”

Tillerson may argue that the comment Thursday wasn't aimed at Trump. But its placement at the very end of his speech should erase any notion this was a coincidence — as should his allusion to how you should “treat others.” Tillerson was repeatedly treated with what he seemed to regard (and what looked from the outside) as a lack of respect by Trump.

And his final public message as secretary of state was essentially this: Don't be like Trump.