WASHINGTON — Studious and diligent, Hillary Clinton spent weeks getting ready for the first presidential debate, poring over policy papers and sharpening attack lines in practice sessions. Donald Trump did not want to over-prepare and skipped running through a full mock session.

At the first presidential debate of general election, it was clear who had done their homework.

Trump was forced to defend his role in the birther movement questioning President Barack Obama’s citizenship, his refusal to release his income tax returns and his derogatory comments about women. But he never found a way to point to the FBI’s assessment of Clinton’s judgment in using a private email system, her family foundation or her recent comments calling half of his supporters a “basket of deplorables.”

Even when Trump accused Clinton of loafing during the campaign — “You decided to stay home and that’s OK,” he said — Clinton was ready to turn the tables, equating preparation for the debate with readiness to be president.

“I think Donald just criticized me for preparing for this debate. And, yes, I did,” Clinton said. “And you know what else I prepared for? I prepared to be president. And I think that’s a good thing.”

Trump did effectively argue that trade deals had hurt manufacturing jobs and made the case that he was the change agent in the race. But Clinton wasn’t pressed by Trump or in some cases, the debate’s moderator, Lester Holt, on a number of her major vulnerabilities.

“He was unprepared at every level to take advantage of any opportunity that presented itself,” said Steve McMahon, a Democratic strategist and former adviser to Vermont Gov. Howard Dean’s 2004 presidential campaign. “He had a pretty good 15 minutes and a bad hour and 15.”

When the discussion turned to her emails, Trump said it was “more than a mistake. That was done purposely,” and faulted Clinton’s aides for taking the Fifth Amendment to avoid incriminating themselves. But he never noted that FBI Director James Comey had called Clinton and her colleagues “extremely careless in their handling of very sensitive, highly classified information.”

There were other omissions. Trump didn’t bring up the 2012 Benghazi attack, which was the subject of a lengthy Republican-led investigation in Congress, or his charges that she created a “pay-for-play” atmosphere at the State Department that benefited the Clinton Foundation. Clinton’s lucrative paid speeches — including to large Wall Street banks — never came up.

Trump could have rallied the Republican base by discussing the potential for multiple Supreme Court vacancies during the next administration or his plans to build a wall along the U.S.-Mexico border. But he raised neither.

When Clinton said in September that half of Trump’s supporters were in “a basket of deplorables,” a crowd she described as racist, sexist, homophobic or xenophobic, she was forced to clean up the statement the next day, stating that she regretted saying “half.” At the time, Trump called it “the worst mistake of the political season.” But he never brought it up on Monday night.

“If there was concern about a candidate who didn’t have the stamina to go the distance, it clearly wasn’t Secretary Clinton,” said Rick Tyler, a Republican strategist who worked for Texas Sen. Ted Cruz, one of Trump’s presidential primary rivals. “She was obviously prepared and he wasn’t. It was devastating.”

Trump could have “hammered her on one her biggest weaknesses, which is the foundation. He missed it,” Tyler said. “He got hammered on everything. She nailed the birtherism to his forehead.”

In the debate’s aftermath, Trump said Holt had directed more aggressive questions at him rather than Clinton and suggested his microphone had been purposely sabotaged. But Sarah Isgur Flores, a Republican strategist and former adviser to Carly Fiorina’s 2016 presidential campaign, countered that Holt gave both candidates enough leeway to have extended exchanges on issues.

“He just wasn’t prepared and it showed,” she said.

Clinton’s lawyer-like preparation helped her pivot when Trump questioned her stamina, shifting the conversation to his past comments about women. “This is a man who has called women pigs, slobs and dogs,” she said in a line likely to resonate with unaligned female voters.

She also got specific, referring to a Venezuelan beauty contestant who became Miss Universe in 1996. Trump called her “Miss Piggy,” and then, Clinton said, “‘Miss Housekeeping,’ because she was Latina. Donald, she has a name.”

Caught flat-footed, Trump responded, “Where did you find this?” Clinton identified the woman as Alicia Machado and vowed that “she’s going to vote this November.”

But the campaign had Machado ready to do more than vote. It quickly released a two-minute web ad in which Machado talked about gaining weight after the pageant and how she felt maligned as “the fat Miss Universe.” The ad says she developed an eating disorder after Trump publicly discussed her weight and shows images of the media watching her work out — at Trump’s invitation.

If Trump thought the moment was a mistake, there was no sign of that Tuesday morning, when he said in an interview on Fox News Channel: “She gained a massive amount of weight. It was a real problem. We had a real problem.”

Before the debate ended, Machado tweeted out to her more than 800,000 followers her appreciation for Clinton’s “respect for women and our differences,” adding, “I’m with you!” The message was retweeted more than 10,000 times, each click another piece of evidence of how Clinton’s preparation mattered.

Ken Thomas and Catherine Lucey cover the 2016 campaign and national politics for The Associated Press. Follow them on Twitter at: http://twitter.com/kthomasdc and http://twitter.com/catherine_lucey

An AP News Analysis