The Democrats’ seizure of the House of Representatives and other advances in the US midterms are hugely welcome and a great relief. But Tuesday’s vote did not see the hoped-for blue wave, and was not a turning point in itself. What matters is what the Democrats, and the president, do next.

Donald Trump was predictably ungracious and combative in what he claimed as a “big victory”, despite his improbable suggestion that it “could be a beautiful bipartisan type of situation”. He thrives on divisions. The record turnout (up 31m votes on the 114m votes in 2014) testifies to his ability to fire up his base as well as galvanise resistance. Candidates embraced his nativism, with nakedly racist and antisemitic campaigns. Mr Trump has boasted of the strengthened Republican hold on the Senate – an unsurprising outcome, given how strongly this round of contests favoured the party. The Democrats’ Andrew Gillum made striking inroads in Florida but couldn’t take the governorship. In Ohio, equally critical, Democratic senator Sherrod Brown held on but Republicans triumphed in other races. Mr Trump could be much worse placed for 2020.

We can expect him to run against the Democratic House in that race: it will make a convenient enemy. That is precisely because the Democrats have ended the era of unchecked Republican power and can now frustrate his agenda on everything from tax cuts to healthcare and immigration. The resistance has moved into the legislature; but they need to show they can be more than the resistance, and can win over opponents. Critically, they now have the power to investigate him; this is not “presidential harassment” but sorely needed oversight. Mr Trump has threatened retaliation, but the biggest challenge for Democrats is picking the right targets and the priority is protecting the work of Robert Mueller, whose report into into Russia’s role in the 2016 election and the alleged collusion of the Trump campaign is pending. No longer fearing electoral repercussions, on Wednesday Mr Trump forced out Jeff Sessions – never forgiven for recusing himself from oversight – and put a senior aide who has called for the defunding and reining in of the investigation in his place as acting attorney-general.

Preliminary exit polls gave House Democrats a 21-point lead among women, while men split almost evenly. Despite some signs that suburban, college-educated women are peeling away from the Republicans, 60% of white women backed Ted Cruz in Texas; in Georgia 76% picked Brian Kemp over Stacey Abrams, seeking to become the first black female governor. But a record 272 women ran for Congress, and at least 95 were elected to the House: the best showing ever, if still far too low. They include the first Muslim and Native American congresswomen (Rashida Tlaib and Ilhan Omar; Sharice Davids and Deb Haaland), and the youngest, Alexandria Ocasio-Cortez. Jared Polis is the first out gay man to be elected governor, in Colorado.

There was good news for Democrats in Pennsylvania, Michigan and Wisconsin (where governor Scott Walker was ousted) – all states which fell to Mr Trump in 2016. Beto O’Rourke’s campaign in Texas made him a star. But mobilising support is not enough. The impact of gerrymandering and voter suppression is increasingly obvious. Democrats won the popular vote in four of the five presidential races this century – yet two of those produced Republican presidents. Democratic senators represent around 3.65 million voters and Republicans around 2.5 million. This week shows that electors are waking up. Michigan backed a non-partisan redistricting commission and automatic voting enrolment. Florida passed an initiative restoring voting rights to 1.4 million felons, disproportionately black men; Mr Trump won there by 113,000 votes. The Democrats won’t just need the right candidate and agenda in 2020, but a fairer system too.