Donald Trump does not like losing, especially to girls.

At Monday night’s debate, when it became clear that Hillary Clinton brought her A game to face off against a C student, Trump lost it. He was pompous and patronizing, settling into a tone that many women might recognize as “mansplaining.” That may play well to his base of disaffected white men eager to see a man put a mouthy broad in her place — men who also may resent their female classmates with 4.0s, their female managers who keep getting promoted, their wives who make more money than they do. But women across the United States surely saw it for what it was: the lashing out of an overinflated, fundamentally insecure man who can’t come to terms with the fact that he has been bested by a woman.

For Trump, the debate started out fine. His slow and steady introductory remarks seemed coached by campaign aides who realize Angry Donald doesn’t play well, and at first, it looked as though he had finally taken their advice. Then Clinton went for his Achilles heel: his ego. She brought up the $14 million loan Trump took from his father to start his business, suggesting that perhaps he was out of touch and ill-equipped to understand the needs of a struggling working class. She deftly packed that jibe into a much longer and more complex answer about the economy and income inequality, so when it was Trump’s turn to respond, he could either continue on the topic at hand or defend himself on a relatively minor point on which there is no real factual disagreement. Incapable of standing down to the suggestion that he isn’t the self-made greatest, Trump took the bait, and it was downhill for him from there. He was defensive, he was boorish, he interrupted and interrupted again — 51 times, by one count.

When he wasn’t bellowing self-justifications, he was condescending, sneeringly asking Clinton if it was okay for him to call her “Secretary Clinton” (an indication, perhaps, of his annoyance at her calling him “Donald”). He went after her on “stamina,” even though he’s older than she is — an insult that came across as obviously gendered, a suggestion she’s weak because she’s a woman. As Clinton continued to challenge him on both policy and accuracy, you could practically see his blood temperature rise. He jumped in, again and again, often on some marginal personal point, trying to shut her down by talking over her.

It was jarring to watch, especially, I imagine, for the half of the country who know from experience that many men try to demonstrate their supremacy simply by pretending you’re not in the room and drowning you out.

Trump, theoretically, should know better than to step on this particular well-marked landmine. His poor treatment of women has been a Clinton campaign cudgel, the source of some of her most effective ads and the likely explanation for his unpopularity among female voters — even as Trump has closed in on Clinton’s lead, he still flags when it comes to women. Many of the same men who love Trump seem to hate Clinton even more, and express their dissatisfaction with her in crude sexist terms, chanting “hang that bitch” at rallies and printing a disturbing amount of testicle-related Trump garb. This vivid misogyny has made the rounds in newspapers and on social media, further cementing the perception that Trump is the candidate of the angry white man. Women can’t stand him, and although his campaign manager, Kellyanne Conway, said afterward that he showed “restraint” by not bringing up Clinton’s husband’s sexual misbehavior, Trump was in fact unable to maintain an air of civility and discipline for long. He tried. He lasted about two minutes — not exactly presidential-caliber stamina.

Watching Trump’s aggressive gesticulations and barked half-sentences was like watching a deranged peacock attempt a display of dominance. But it was Clinton, in her bright red suit, who put on the more spectacular show of authority. She expertly manipulated his reactions, and she did it by turning some familiar gender dynamics on their head. Women are often described as hysterical for raising their voices or — really — showing any emotion at all, making it easier for men to take on a “father-knows-best” attitude and dismiss them as little more than silly girls. In the debate, though, it was Clinton who quickly assumed the power position: She vacillated between stone-cold and smirking sardonically, letting her opponent throw the temper tantrums. Her voice didn’t rise, but her eyebrows sure did. For me, that was particularly sweet — the exact face I wish I could have made in my 20s to an egotistical boss or an arrogant male co-worker.

Clinton even adopted the favorite refrain of mansplainers everywhere: “Well actually…”  She used the term “actually” 10 times throughout the debate, a subtle verbal indication that she was the rational, factual candidate on stage, casting Trump as the emotion-driven hysteric. And she called Trump “Donald,” a shrewd dig at a guy who insists on being called “Mr. Trump,” apparently hates his nickname “The Donald” and has spent his career erecting his last name in big gold letters.

All that was a difficult tightrope for Clinton to walk. We know from study after study that men interrupt more than women, and they interrupt women more than they interrupt other men. For women, this is frustrating, but it’s also normal — and the most common social dynamics are often also the most entrenched, making them the most difficult to see. So even though men are more likely to make a habit of talking over women, they don’t pay much of a social price for it. One study found that male executives who talk a lot are considered more competent than their less-verbose peers, while women who talk more than their peers are considered less competent. The more powerful men become, the more they talk, but the same doesn’t hold true for women — even in the U.S. Senate, power is linked to speaking time on the floor for the men, but not for the women. When women are outnumbered, they speak less, while men talk even more. And men often interrupt specifically because they want to assert dominance, not because they’re making a small error of etiquette. When women interrupt, they’re more likely to be considered aggressive, rude or unfeminine.

Clinton, then, was playing on an uneven field: If she talked too much, she’d be dinged, but she needed to establish her authority over a male opponent, in front of an electorate deeply uncomfortable with female authority. Dominate the conversation, and she’s a pushy bitch. Stay too quiet, and she’s too meek. Respond to Trump’s furious tone and defensive posture in kind, and she’s unhinged, out of control, weak.

And so she just smiled. She kept talking calmly and evenly, even when Trump tried to talk over her. She slowly and delicately dug under his thin skin. She corrected him firmly and sometimes mockingly, but with at least a veneer of courtesy. She avoided gender-related hazards and let him trip over them instead.

You might say she womansplained her way to a win.

Read more: