NEW YORK (AP) — For two weeks in February, Hillary Clinton's campaign appeared on the brink of falling into an all-too-familiar pattern.
Her razor-thin win in Iowa and crushing defeat in New Hampshire to Bernie Sanders sparked questions about her weaknesses as a candidate and second-guessing about her operation. A flood of "helpers" — the derisive term some aides use to describe the legion of Clinton friends and allies outside the campaign— wanted to offer advice. Press reports began popping up about an internal shakeup.
"We were worried," recalled Missouri Sen. Claire McCaskill, a Clinton backer. "We thought this will be really a test, can she withstand everyone talking in her ear?"
It was a test Clinton would pass.
Within weeks, she started opening a delegate lead that would never close. Her campaign team remained intact, displaying discipline that surprised veterans of the Clintons' past political operations. After victories March 15 primaries, aides celebrated at the campaign's Brooklyn headquarters with a boozy, late-night dance party, confident that Clinton had put the nominating fight out of reach for Sanders.
For Clinton, those were the moments when she finally shed the ghosts of her failed first White House run in 2008, a cursed campaign that repeatedly buckled and ultimately collapsed under pressure.
"We just stuck together," said Robby Mook, Clinton's campaign manager and a target of early shakeup rumors. "That was a really galvanizing and important moment for the campaign."
In many ways, Clinton's 2016 success was a redemption story, the tale of how a flawed candidate overcame some of her failings. But the campaign also underscored that Clinton can't help being her own worst enemy.
The question now is which Clinton — the rehabilitated policy wonk or the reflexively defensive politician — will win out as she faces perhaps her most unpredictable challenge: Donald Trump.
Nearly two years before announcing her candidacy, Clinton commissioned an extensive evaluation from a team of Democratic consultants. They made the following recommendations: Clinton would have to run a more disciplined, frugal operation. She'd need to focus far more on winning delegates. And she would have to overcome questions about her authenticity.
On two of those three fronts, Clinton found a winning formula in her primary campaign against Sanders.
Gone were the old Clinton hands, with their warring fiefdoms. Mook, a young operative known for inspiring fierce loyalty among his staff, prided himself on thriftiness.
Aides say Clinton was fixated on the campaign's delegate operation, desperate to avoid one of the most glaring mistakes from 2008. While Clinton captured more votes that Barack Obama in that race, his operation mastered the complex delegate allocation process that ultimately gave him the edge.
So Clinton hired the man who built the system that defeated her, delegate guru Jeff Berman.
Last summer, Berman began locking down crucial superdelegates for Clinton.
By November, Clinton had public support from nearly half the superdelegates, according to an Associated Press count. That gave her 15 percent of overall delegates she would need to win the nomination before voting even started.
Even with her campaign on more solid footing, nothing prepared Clinton for the challenge she would face from Sanders.
A rumpled 74-year-old from Vermont, Sanders quickly began drawing massive crowds around the country and announcing eye-popping fundraising totals.
His supporters appeared to be drawn as much to his populist economic message as his raw authenticity, which stood in sharp contrast to Clinton's carefully scripted style.
Revelations about the private server she used at the State Department saddled Clinton with new questions about her trustworthiness even before she officially launched her campaign. Her sudden pivot on issues such as trade seemed to underscore that she was willing to shift positions to match the political moment.
And, perhaps her biggest problem: Some voters simply didn't like her.
In an effort to solve the likeability issue, Clinton's campaign tried to put her in situations where she'd play to her strengths, maximizing one-on-one interactions in smaller settings and policy-heavy roundtables. And unlike in 2008, when she all-but-ignored her gender, Clinton owned her historic status.
Karen Finney, a campaign spokeswoman, said Clinton "had a real vision about how she wanted to do the campaign and what works best for her."
At times, that meant walking away from her husband's legacy as president, including the 1994 crime bill that is blamed for mass incarcerations, particularly among minorities. Clinton went on to draw massive support from black primary voters.
Clinton's aides say she's eager for a bruising, no-holds-barred battle against Trump and a Republican Party that has targeted her for decades.
It's a fight she's been girding for since her days in Arkansas and the Clintons' early years in Washington. While Clinton may struggle with the softer side of politics, she's at her best when pitted against a partisan opponent, particularly one she deems a policy lightweight.
But at least for a few moments Tuesday, Clinton stopped to relish in her milestone moment as the first woman to ever lead a major U.S. political party.
"She told me to never back down from a bully," Clinton said during an emotional remembrance of her mother.
Then, seamlessly slipping back into the political fight to come, Clinton added: "Which it turns out was pretty good advice."
Follow Lisa Lerer and Julie Pace on Twitter at: http://twitter.com/jpaceDC and http://twitter.com/llerer