Hillary Clinton made history Monday as she became the first woman to win a major party’s presidential nomination, ending a grueling primary that suggested that her return to the White House will be anything but easy.

Wins in Guam and Puerto Rico, along with superdelegates sliding her way, put the former Secretary of State, Senator from New York and First Lady of the United States and of Arkansas over the top, according to The Associated Press. The evening alert brought the long-awaited end to her fierce primary campaign against populist rival Bernie Sanders, who proved a more durable and formidable opponent than she had expected, and an American electorate that, even after decades in the public eye, still was not warm toward Clinton. The news also came just one day short of eight years since Clinton herself conceded to Barack Obama in 2008.

The Clinton campaign quickly responded to the AP call on Twitter, encouraging voters to turn out in the six states that vote Tuesday.

Now, her focus turns to her Republican rival, billionaire Donald Trump who has proved an unpredictable and unprecedented opponent. Trump vanquished 16 rivals—Governors, Senators and industry leaders alike—to prevail in the GOP race with a blend of populist anger, new voters and long-shot promises that would be near impossible to enact. Clinton’s victory over Sanders shows her campaign is capable of derailing the pie-in-the-sky rhetoric. But it isn’t easy, even with a sophisticated political apparatus behind her.

The Clinton campaign is perhaps the most advanced ever, with teams of data scientists, message analysts, new media mavens and traditional get-out-the-vote engineers packed into two stories of a Brooklyn headquarters and around the country. The campaign is building on President Barack Obama’s two technically groundbreaking campaign techniques, and Clinton has invested millions in a political machine that, if it works, could make history and elect the nation’s first female President.

But that machine is fighting a lopsided opponent. Trump has bragged that he doesn’t put much stock in the nuts-and-bolts of traditional campaigns or data. He suggests his gut will guide him more than polling, that focus groups are for losers and that Trump is the best strategist in the game. He might be right. Or he might just be naïve. In a year when the entire political rulebook has been shredded, it’s impossible to know.

Clinton’s team is bracing for an ugly campaign. Already, Trump has invoked the scandals—and the faux-scandals—of the 1990s and has cast the current incarnation of Clinton as a “crooked” politician who deserves to be in jail for using a private email address. He has shown little regard for her lifetime in the public eye—or that the Clintons attended the reception for his third marriage—and has been devastating in his criticism. All which goads his massive audiences into rage against Clinton. Independent vendors at some of his stops sell T-shirts declaring “Hillary sucks, but not like Monica,” a nod to Bill Clinton’s intern scandal. “Trump that bitch” is another popular slogan. No one said this campaign would be appropriate for all ages, or that it would treat Hillary Clinton any gentler because of her gender.

Clinton’s top aides know that the tone is going to be worse in a one-on-one race against Trump, whose anti-PC crusade propelled him to lead the GOP. But those aides have been coaching her to throw some of her own elbows. On Thursday, she delivered perhaps the best speech of this campaign, tearing apart Trump’s foreign policy views and tweets. Aides were buoyed by the showing and the reaction and, for the first time in weeks, were less worried about how their candidate would fare against Trump. And Clinton seemed to genuinely enjoy herself launching barbs against the bombastic Trump. She repeatedly called him simply “Donald” in a dismissive tone.

The coming five months will seem like a lifetime, and Clinton’s outside advisers are hoping her campaign can use her Trump tone on foreign policy as a model for other remarks. There is plenty for Clinton, a proud policy wonk, to plow through now that she can largely ignore Sanders. Immigration, energy, the economy, housing and education are all areas ripe for a Clinton schooling of Trump.

Sanders, meanwhile, seems unwilling to acknowledge it is closing time for his campaign. He told the AP that he disagreed with its math and said Clinton doesn’t have the pledged delegates. He says he would fight on right into the Democrats’ nominating convention in Philadelphia. He recently told TIME that it’s far too soon to consider ending the campaign because the superdelegates—the party insiders who made Clinton’s nomination possible—don’t really cast ballots until Philadelphia, and he wanted to sway them to his side.

Which means Clinton will still have to weather Sanders’ unyielding criticism, and the amplified version coming from his supporters. Just last week, Sanders backer Susan Sarandon insisted during an MSNBC interview that a Clinton indictment over her email practices was inevitable. In some ways, she and Trump were operating from the same space along the anti-Clinton spectrum.

Such constant grinding will grate on Clinton’s already high unfavorable ratings, which are rivaled only by Trump’s numbers. More Americans have an unfavorable view of Trump than a favorable one, by a 27 percentage point margin. Clinton is also underwater, but her gap is a narrower 14 percentage point deficit, according to Gallup. That’s little consolation for Clinton, who for years has faced some version of the question: Why don’t voters like you?

That question might simply not matter. She is now the de facto nominee for the Democratic Party. The base of her party is growing more quickly than Republicans’ core supporters. She has the better campaign machinery. She has the donor network that Trump never will. Her team is remarkably unified, while Trump’s inner-circle feuds publicly in the New York tabloids and on cable shows. And, as Clinton’s team bets, Trump’s nomination will be sufficiently horrifying to unify Democrats who didn’t vote for her in the primary. They don’t have to like Clinton. They just need to defeat Trump.

Get our Politics Newsletter. The headlines out of Washington never seem to slow. Subscribe to The D.C. Brief to make sense of what matters most. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Philip Elliott at philip.elliott@time.com.