WASHINGTON — Donald Trump must have known better, but he just couldn’t help himself.

He had to know that Hillary Clinton was going to bait him, just the way she did in the previous two debates, saying things about him that belittle him, usually with some truth behind them to add some real sting.

Clinton started by saying, as others had, that Trump “choked” when he had the chance to challenge the president of Mexico when the two met over the summer, and tell the foreign leader to his face that Trump would force Mexico to pay for a wall.

“Didn’t even raise it. He choked,” Clinton said. “Then got into a Twitter war because the Mexican president said, ‘We’re not paying for that wall.’”

Trump resisted that dig. But Clinton kept calling him “Donald” instead of his preferred “Mr. Trump.” And she continued to characterize his positions in ways that Trump didn’t like. Eventually, his rude interjections from the earlier debates reasserted themselves.

As Clinton kept reminding people that Trump told Howard Stern that Trump supported the Iraq War — which Trump says he never did — he repeatedly grunted the word “Wrong,” as he had done when he was cracking in the earlier two tilts between him and Clinton.

There were a couple of other moments from Clinton, but Trump held it together better than he had.

He finally lost it when Clinton dropped an aside that Trump would probably duck trying to pay increased taxes to support Social Security.

“I am on record as saying that we need to put more money in the Social Security trust fund. That’s part of my commitment to raise taxes on the wealthy,” Clinton said, before dangling another freshly baited hook for Trump. “My Social Security payroll contribution will go up, as will Donald’s ― assuming he can’t figure out how to get out of it.”

The tax-dodge blow fell like a depth charge, with the reaction a little slow in coming. Trump’s head tilted, and he started to shake it back and forth. He blinked and then squinted as the angry comeback boiled up from inside while Clinton went on about the trust fund.

“Such a nasty woman,” Trump said, raising a finger with more head-shaking, a smirk and a mouth that opened and closed as he stopped himself from saying more.

But that was probably enough. “Nasty Woman” became an anti-Trump meme to rally around almost instantly.

Hey, women? Let's all get our nasty asses to the voting booth on November 8th. #debatenight — Lauren Duca (@laurenduca) October 20, 2016

"Nobody respects women more than me, you nasty woman." Huh. — George Takei (@GeorgeTakei) October 20, 2016

The @HillaryClinton team has already purchased https://t.co/4On1vCFxnr and it redirects to the campaign site. 👏👏👏 — Jill Ivey (@jillianivey) October 20, 2016

Editor’s note: Donald Trump regularly incites political violence and is a serial liar, rampant xenophobe, racist, misogynist and birther who has repeatedly pledged to ban all Muslims — 1.6 billion members of an entire religion — from entering the U.S.