At the first presidential debate, Hillary Clinton delivered a master class in psychological warfare when she brought up Donald Trump’s cruelty toward Alicia Machado, the former Miss Universe he’d referred to as “Miss Piggy” and “Miss Housekeeping.” “Where did you find this?” Trump spluttered in confusion as she unfurled the story. In a way, Trump’s question paid homage to the work Clinton and her team had clearly put into selecting the perfect transgression from Trump’s past and buffing it into a debate-ready sound bite. Almost as soon as the proceedings ended, the Clinton campaign dropped an ad featuring Machado.

From the early minutes of the third presidential debate, it was apparent that Clinton has progressed miles from that initial display of artistry. The Machado moment was a carefully calculated stroke of brilliance—Clinton and her team spent time gaming out the best route into Trump’s head and the most destabilizing seed to plant there. By Wednesday night, Clinton appeared so familiar with the way Trump thinks—or, more accurately, with the way he speaks before doing so—that she could bait her opponent off the cuff. She seemed utterly at ease, for example, when she said that Trump “choked” in a meeting about his proposed wall with the president of Mexico. Trump had managed to go more than 20 minutes without interrupting Clinton or moderator Chris Wallace, but that small barb punctured his composure. As Art of the Deal ghostwriter Tony Schwartz pointed out on Twitter, it was “all downhill for Trump from there.”

Some of the hooks that Trump bit onto Wednesday night were zingers from the second debate, sharpened and recast. Two weeks ago, Clinton nailed Trump for being cozy with the Kremlin, saying, “We have never in the history of our country been in a situation where an adversary, a foreign power, is working so hard to influence the outcome of the election. And believe me, they’re not doing it to get me elected.” Trump, who had been trying to hit Clinton on her paid speeches to Wall Street, couldn’t refrain from defending his relationship with Russia—a counterattack that led, inscrutably, to his word salad about “the old post office.” In the third debate, Clinton was pithier: Putin is backing Trump because “he’d rather have a puppet as president.” Trump was too flustered to come up with an original insult for a rejoinder. “No puppet, no puppet,” he said, and then, “You’re the puppet. No, you’re the puppet.”

Clinton landed a number of blows at the second debate. She delivered an eloquent character sketch of Trump as a man who “never apologizes to anybody for anything.” She quelled Trump’s interruptions by saying, in a tone resonant with the message that he was wasting her time, “OK, Donald. I know you’re into big diversion tonight—anything to avoid talking about your campaign and the way it’s exploding and the way Republicans are leaving you.” These moments gave her the upper hand in a debate that felt like an out-and-out brawl. Wednesday night was different. Clinton seemed to go in ready to needle Trump, casually and consistently, and in doing so, she kept him off balance more or less throughout their exchange.

As Clinton may have suspected, nothing could bring out Trump’s ugly side faster than the suspicion that he might be losing to a woman. Shortly after she accused him of buying illegally imported Chinese steel, he talked over her, saying loudly, “Excuse me, my turn.” When she listed the many people he has bullied and insulted over the course of his campaign—reiterating her point from the previous debate that Trump “never apologizes”—he interjected sourly, and baselessly, “Wrong.”

In fact, Clinton provoked what was arguably Trump’s worst slip of the night. In the final minutes of the debate, she made a quip about his taxes, and he responded by breathing into the microphone: “Such a nasty woman.” Commentators are widely declaring this “the moment when Trump lost the debate”; even Fox News’ debate analysts took issue with the line. It’s one of the worst possible sound bites that Trump could’ve left echoing from his debate performance. If Clinton set and baited the trap, Trump walked right into it.

Read more Slate coverage of the 2016 campaign.