Donald Trump wants America to know that he’s smart. When pressed, he’ll cop to being greedy and even a bit dishonest in his past dealings. He’ll admit he’s said inflammatory things over the course of his campaign and even kinda sorta maybe apologize for some of them. But he’s a smart guy. A rich guy. A savvy operator who wants America — or at least a certain slice of America — to believe he’s now going to be on their side.

But in Monday night’s debate he not only revealed himself to be a bit of an ignorant, blustering fool. He also showed that he’s not nearly as shrewd as he likes to think he is by stumbling into an elaborate trap: Alicia Machado.

It started near the end of the debate, when Hillary Clinton took a hard — indeed, awkwardly so — pivot to bring her up:

HOLT: We are at the final question. CLINTON: One thing, Lester. He tried to switch from looks to stamina. But this is a man who has called women pigs, slobs, and dogs. And someone who has said pregnancy is an inconvenience to employers, who has said— TRUMP: I never said that. CLINTON: Women don't deserve equal pay unless they do as good a job as men. And one of the worst things he said was about a woman in a beauty contest. He loves beauty contests, supporting them and hanging around them. And he called they woman “Ms. Piggy.” Then he called her “Ms. Housekeeping,” because she was Latina. Donald, she has a name. TRUMP: Where did you find this? CLINTON: She has become a US citizen, and you can bet she's going to vote this November.

It’s the perfect Trump anecdote. It shows Trump being misogynistic and racist. But it also shows him being disparaging to low-wage workers. The story also has a perfect punchline about becoming a citizen and registering to vote — a key issue for Clinton, whose demographic base includes a relatively large share of “unlikely voters,” especially Hispanics, who have traditionally turned out at a lower level.

Clinton’s campaign was ready with a bilingual video to drive home the importance of the moment:

Trump blundered right into it

One of Clinton’s key campaign themes since the convention has been that it’s too easy to get under Donald Trump’s skin. In her nomination acceptance speech, Clinton said “a man you can bait with a tweet” lacks the composure necessary to be an effective president.

Much of the debate was dedicated to proving that point, with Clinton gently needling Trump by calling him “Donald” and mentioning the $14 million he borrowed from his father.

The Machado gambit fit the same mold. Trump’s initially response to was dig back deeper into his years-old and completely irrelevant feud with comedian Rosie O’Donnell. Then this morning, still smarting over the attack, he raised the stakes by launching new attacks on Machado’s character and weight.

As my colleague Emily Crockett writes:

What’s remarkable about the Fox and Friends exchange, other than its cruelty, is that Trump brought up the Miss Universe moment unprompted. It was a moment during the debate that looked bad for Trump, and he had to have known that. But Trump couldn’t help himself. Much like when he kept attacking the family of a fallen Muslim American soldier who criticized him at the Democratic National Convention, Trump couldn’t help trying to reassert his dominance after being publicly called out for saying something shameful. And he just didn’t seem to understand how cruel and offensive his comments would sound to most people. Trump also didn’t deny, either on Fox and Friends or during the debate, that he called Machado “Miss Piggy” or “Miss Housekeeping.” Machado says Trump called her those names to her face.

This is, simply, a blunder.

Whether or not Trump was mean to a beauty pageant contestant years ago is not an obvious focal point for a national political campaign. If Trump were to refuse to engage and maybe vaguely apologize, it would be easy for him to switch the conversation to something else. But by bringing it up on his own, he gave the story new legs.

Machado was ready for Trump

And it now turns out that Machado was eager to inject herself into the 2016 election and had been working on it for some time.

Cosmopolitan is out today with a long feature story on Machado headlined “Former Miss Universe Alicia Machado Won't Be Defined by Donald Trump's Fat-Shaming.”

The author of the story, Prachi Gupta, is the person who conducted a devastating interview with Ivanka Trump earlier in September. The Machado article includes photographs that were taken a week ago, making it clear that the groundwork for the debate moment was laid some time ago. And the story advances the anti-Trump narrative with new anecdotes about his crass behavior:

As she prepped for her portrait session, Machado recalled another incident of Trump’s fat-shaming. Toward the end of her reign of Miss Universe, she was writing thank-you cards in the Los Angeles Miss Universe office when he asked her what she wanted to do next. “You'll never be an actress,” he told her, “because you are too fat to be an actress, and nobody wants fat girls on TV shows.”

The tagline at the bottom of Gupta’s story reads, “Election day is Nov. 8. If you haven’t registered to vote yet, you can do so here.”

So @lucia_graves happened to interview Alicia Machado on Friday (!) because she's brilliant and clairvoyant. https://t.co/pBKTXb6L8y — Alex Seitz-Wald (@aseitzwald) September 27, 2016

It turns out Machado also set up an interview with the Guardian’s Lucia Graves, timed perfectly for the debate clash; the New York Times also has a fresh Machado story based on interviews.

Trump is a sucker

During the primaries, Marco Rubio characterized Donald Trump as a “con man,” and he won’t apologize for it even though he’s now on the Trump Train.

Instead, like many Republicans, Rubio seems to have decided to choose to believe that he is in on the con. Trump may not have been his first choice for nominee, but at least he is a vehicle through which the Republican Party can hope to win the White House and pass some of its priority legislation.

The Trump we are seeing unfold over the past 24 hours, however, is something different.

Not just a crude bully, a racist, a liar, or a misogynist — it’s Donald Trump as a sucker. The feud with the Khan family from earlier this summer is widely regarded as a self-inflicted fiasco, but at a minimum it appears to have been a genuine accident — the Khans’ speech was not scheduled for primetime, and Democrats seem to have underrated how powerful it would be.

The new war with Machado is nothing like that. The Clinton campaign laid surprisingly intricate groundwork to turn her into a major story both at the debate and in the days following it.

And Trump fell for it, revealing a new side to himself that the public hasn’t really seen before.

Watch: How presidential debates are won and lost