AS IF weary of a primary tussle in which the outcome has long been obvious, Democratic voters knocked it on the head on June 7th. Bernie Sanders, whose refusal to admit defeat defies electoral mathematics, hoped to win at least four of the last six states up for grabs, including the biggest, California. But Hillary Clinton whupped him; she won the Golden State by a 13-point margin, also New Jersey, New Mexico and South Dakota.

In the process, the former secretary of state secured a big majority of the 4,765 delegates who will attend the Democrats’ National Convention in July. That makes her the prospective nominee, the first woman to hold the role for either big party and, given how spectacularly ill-chosen her Republican counterpart, Donald Trump, seems, the favourite to be America’s next president. For a politician whose woodenness as a campaigner has been as conspicuous as her toughness, and for the 15.5m Democrats who have voted for her, it is an impressive achievement.

Even before these last primaries (only Washington, DC, on June 14th, is still to vote) the Associated Press reckoned Mrs Clinton had the 2,383 delegates required for the nomination. Nervously, her campaign team tried to downplay this. The reckoning was based on Mrs Clinton’s big lead among superdelegates—the 715-odd Democratic office-bearers who may vote at the convention as they please—which Mr Sanders has decried as an establishment stitch-up. Mrs Clinton’s aides also feared that declaring victory before the primaries would make her supporters complacent. They worried too much.

Just as the Republican primary contest ended last month with a flurry of unexpectedly big wins for Mr Trump, as resistance to his candidacy crumbled, so Mrs Clinton outperformed her polling in almost every state; recent polls in California had suggested she was barely ahead. She has secured almost 400 more regular delegates, the sort awarded at primaries and caucuses than Mr Sanders, and 3.5m more votes. No wonder Mrs Clinton appeared ecstatic, even tearful, at a celebratory rally in New York, before California’s polls had even closed. Movingly, she recalled that her mother was born on the day, June 4th 1919, Congress voted to give women the vote: “I wish she could see her daughter become the Democratic Party’s nominee!”

Mr Trump probably had a hand in Mrs Clinton’s late surge, by offending, and so rallying, the non-white voters who are among her main supporters. As his party’s nominee, endorsed in recent weeks by most senior Republicans (though many of them privately despise him), the celebrity builder had been expected to tone down his signature boorishness; he himself had sworn to be “very presidential at the appropriate time”. Apparently unable to control himself, he has instead levelled bigoted abuse at a federal judge presiding over allegations of fraud against one of his failed businesses, Trump University. Mr Trump accused Gonzalo Curiel of being biased against him on account of his tough line on illegal immigration because, he says, the judge is “Mexican” (as it happens, Mr Curiel is from Indiana). No exit polls were conducted in California, where Hispanics account for over a quarter of the electorate, but Mrs Clinton won all the most Hispanic districts there.

At a polling station in Santa Ana, a largely-Hispanic area south of Los Angeles, most voters said they were for Mrs Clinton—and often they mentioned Mr Trump disparagingly in the same breath. Anita Hernandez, a retired school secretary, said that choosing Mrs Clinton was in the end an “easy decision”, though she had once been tempted by Mr Sanders: “I think he should stop and let her do her thing.” Another retiree, Leo Luna, voted the same way—despite personally preferring the senator from Vermont. “We have to unify ourselves behind a strong candidate,” he said. “I think there’s a lot at stake…remember, we are all basically the sons and daughters of immigrants.”

America's primary agenda: our interactive 2016 election calendar Amazingly, on June 8th Mr Sanders reiterated his pledge to fight on to the convention. Perhaps he may rethink that. His retinue, which was never large, is thinning; on the same day, Jeff Merkley, Mr Sanders’s only supporter among his fellow senators, and Raul Grijalva, one of his handful of backers in the House of Representatives, suggested he should quit. His campaign was meanwhile laying off most of its employees. As The Economist went to press, Mr Sanders was due to hold talks with Barack Obama, who would like him to withdraw ahead of the president’s imminent endorsement of Mrs Clinton. Even before polling ended in California, a close adviser to Mr Sanders hinted that he might stay in for the Washington, DC, primary, then quit. Little-known before he announced his presidential run last year, Mr Sanders has fought an astonishingly effective and, for many of his 12m supporters, inspiring campaign: it is over already. Mrs Clinton in a sense signalled that on June 2nd with what was billed as a speech about foreign policy, but was actually an excoriation of almost everything Mr Trump has said on the subject. Her rival’s “ideas aren’t just different,” she said. “They’re not even really ideas, just a series of bizarre rants, personal feuds and outright lies.” This was a response to Mr Trump’s increasingly vicious attacks on her; he has called Mrs Clinton an enabler of an adulterous husband and hinted she could be a murderer. It was also manna for many Clinton supporters. Deeply frustrated by her failings as a campaigner—which have been exacerbated by Mrs Clinton’s need to tiptoe around Mr Sanders, whose supporters she covets and with whose ideas she sympathises—they have been longing for her to stick it to Mr Trump. Emotionally tough and intellectually rigorous in a prosecutorial sort of way, Mrs Clinton is better at winning voters’ regard than their love. Even so, they might be forgiven for wondering what she stands for. Her policy platform is built on all sorts of worthy centre-left nudges and nurdles, but no talismanic idea. Even Bill Clinton, who claims to know her best, praises Mrs Clinton as an incrementalist, not a visionary; “Everything she touched she made better,” he says of her early career.

Yet as an argument for a third Democratic term, not the new broom that Mr Obama was in the right time and place to promise, moderate improvement is at least credible. And then, a real partisan punch-up, unpredecented in its viciousness, is what many voters seem to want from this election. The Democrats have picked the right woman to deliver it.