President Trump ripped former Defense Secretary James Mattis as “the world’s most overrated general” on Wednesday during a White House sit-down on Syria with congressional leaders, sources told The Post.

The presidential gibe came as Sen. Chuck Schumer quoted the general’s interview on NBC’s “Meet the Press” Sunday in which he said the Islamic State could “resurge” in Syria if the US eases military pressure.

But Trump cut Schumer off and responded with the insult, blasting Mattis for not being “tough enough,” per two sources familiar with the event, including one who offered a readout of the meeting.

During the meeting, Trump also said that fewer than 100 ISIS prisoners had escaped after US troops withdrew from the region and insisted they were the “least dangerous” ones.

Asked whether that was true, Defense Secretary Mark Esper said he didn’t know if they were the least dangerous.

The sit-down devolved when Trump called House Speaker Nancy Pelosi “a third-rate politician” and a Communist sympathizer.

Pelosi said Trump was shaken by an earlier House vote condemning his decision to pull troops from northern Syria, and called Trump’s behavior “a meltdown.”

As House Majority Leader Steny Hoyer and Pelosi left the meeting, Trump said: “Goodbye, we’ll see you at the polls,” per the readout.

Schumer left soon after.

The White House did not respond to requests for comment on the Mattis remark.

Additional reporting by Tamar Lapin