It was supposed to be a triumphant Rose Garden news conference for President Trump. The United States, Canada and Mexico had reached a new trade deal, an update of the decades-old NAFTA, which he has deemed a “disaster.”

Then, as has been known to happen during Trump’s news conferences, things took a turn. He opened the question-and-answer session by inexplicably deriding a female reporter. Here is Trump calling on ABC News’s Cecilia Vega for the first question of the news conference:

Trump: "She’s shocked that I picked her. She’s in a state of shock.

Vega: “I’m not. Thank you, Mr. President."

Trump: “That’s okay, I know you’re not thinking. You never do.”

Vega: "I’m sorry?

Trump: “No, go ahead.”

It seems likely Trump heard her say “I’m not thinking," instead of “Thank you,” hence his reply. And a transcript the White House produced of the event initially quoted Trump as responding “I know you’re not thanking. You never do." They later sent a corrected version of the transcript that said “thinking."

There are two things about this exchange that were disturbing, although not out of character for Trump:

First, his attack on Vega came out of the blue. Vega hadn’t yet asked a question, so Trump can’t blame his derision on something she had just asked. (Not that that would be normal behavior for a president, either.)

Second, the attack came across as gender-driven. When Trump wants to attack women, he often resorts to stereotypes, reducing women to their looks or their intellect (or supposed lack of it) in many instances. In summer 2017, he attacked MSNBC anchor Mika Brzezinski by alleging that she had a “facelift.” In his very first presidential debate, Trump pushed back on host Megyn Kelly for questioning him about his treatment of women by saying that “she had blood coming out of her wherever.” He has called NBC News’s Katy Tur “little Katy” and New York Times columnist Maureen Dowd “crazy.”

“One way he exercises his ‘masculine power’ is to talk to and about women on the basis of their appearance, instead of more substance,” Rutgers University’s Kelly Dittmar told me last summer, having just finished a study on the role of gender in the presidential campaign.

Belittling women in those terms is standard Trump practice. But the unprompted way he did it Monday is especially notable, given that Republicans are coming off a week of criticism for moving forward with a Supreme Court nominee accused of sexual assault — a nominee Trump spent a significant chunk of time Monday defending.

Trump’s eyebrow-raising treatment of Vega and other female reporters in the Rose Garden on Monday didn’t stop with the “thinking” comment. He refused to let Vega ask a question about the other big news of the day: the FBI investigation into his Supreme Court nominee, Brett M. Kavanaugh. (The president came back to her after other reporters had asked about trade, the subject of the news conference. Vega wasn’t impressed.)

And when CNN’s Kaitlan Collins kept pressing Trump as he dodged a question on whether he would consider it disqualifying for Kavanaugh if he lied to Congress while under oath, Trump cut her off: “You know what. You’ve had enough. You’ve really had enough.”

Trump also called the media part of the Democratic Party — an attack that has filtered its way down to Republican members in Congress — and “loco.”

At a moment when his party is worried about losing female voters in November’s midterm elections, Trump seemed particularly ready to attack women in the press corps.

Correction: This post has been corrected to reflect the order Vega said “Thank you” in her response.