Mattis, who was the keynote speaker of the blue-blooded charity dinner, made the remarks after Trump attacked the retired Marine Corps general for his opposition to the withdrawal of American forces from Syria. Trump last week announced the pullback of the U.S. military presence in the country to the consternation of lawmakers from both sides of the aisle. The withdrawal has opened the way for Turkish airstrikes against Kurdish forces, who had been loyal allies to the U.S. in the fight against the Islamic State.

Both Democrats and Republicans in Congress have strongly condemned the move and the subsequent Turkish aggression. Democratic congressional leaders met with Trump at the White House on Wednesday to discuss the issue, but the meeting devolved into an angry confrontation involving name-calling and an early walkout by the Democrats.

When Senate Minority Leader Chuck Schumer cited an assessment by Mattis that the withdrawal of troops from Syria allowed ISIS to rebound, Trump declared Mattis “the world’s most overrated general” and claimed credit for defeating the militant group for himself. The remark revealed the lingering bad blood from Mattis’ departure from the administration in December, which came in protest to an earlier plan for a military exit from Syria.

Mattis had a storied military career long before the Trump presidency, having served in the Persian Gulf, Afghanistan and Iraq. As a retired four-star general, he was seen as a stabilizing force among the temperamental decision making of the administration. He voiced opposition to some of Trump’s most contentious acts, including withdrawing from the Iran nuclear deal and escalating tensions with North Korea. Mattis’ devotion to postwar alliances stood in contrast to the president’s penchant for isolationist and transactional rhetoric.

Mattis’ departure shook Washington and sank morale at the Pentagon, with Sen. Mark Warner (D-Va.) tweeting at the time: “This is scary.”

Trump had been dismayed at the attention Mattis’ resignation received, and even tried to scoop his resignation by tweeting out that Mattis was “retiring” minutes before the Pentagon announcement. Though Mattis had indicated in his resignation that he’d planned to serve out his role until February of this year, Trump abruptly declared on Twitter that his successor, Patrick Shanahan, would take the helm on Jan. 1.

In his December resignation letter, Mattis wrote that Trump had “the right to have a secretary of defense whose views are better aligned,” and has previously said he owed Trump a duty to keep to himself about his opinions on the president's leadership.

But that didn’t stop the former Pentagon head from jabbing at the president on Thursday night.

“You have to admit,” Mattis told the dinner attendees, “that between me and Meryl, at least we had two victories.”

Mattis went on to say that while he "earned my spurs on the battlefield," Trump "earned his spurs in a letter from a doctor." The jab is a reference to Trump's deferment from the draft during the Vietnam War for bone spurs.

Schumer, who also attended the dinner, joined in on the jokes, tweeting out that “it was great to catch up with General Mattis — the Meryl Streep of Generals.”

While President @realDonaldTrump was having another rally, it was great to catch up with General Mattis—the Meryl Streep of Generals. pic.twitter.com/UHxCObLu0q — Chuck Schumer (@SenSchumer) October 18, 2019

Still, Mattis’ levity didn’t completely drown out his silence in retirement. Sen. Brian Schatz (D-Hawaii) quote-tweeted a video of Mattis at the dinner and urged him to speak up.

“You are not a TV personality,” Schatz wrote. “Tell us what you think. Tell us what you know. The Republic depends on people like you speaking clearly, quickly, forcefully. All hands on deck.”