The “blue wave” took a little longer to crest than usual, but after several days of vote counting it looks like Democrats beat the historical average for the midterm elections.

With more races called since Election Night, Democrats have netted 30 seats in the House and are leading in five others.

The midterms mean the White House, on average in all 25 non-presidential cycles in the last century, loses 29 allies in the House. It appears House Democrats are just past that benchmark, outpacing the gains of at least 12 other midterm election cycles since 1918.

Typically, the party controlling the White House — in this case, Republicans — loses seats in midterm elections. In the last hundred years, only three times has the party in the White House seen gains in non-presidential years.

It wasn’t just the the House. Democrats picked up at least seven governors’ offices. The Senate map remains contingent on incredibly close races in Arizona and Florida; Democrats appear to have an advantage in Arizona, while Republicans in Florida have the advantage for now. Mississippi, which backed Donald Trump’s presidential bid in 2016 with 58% of the vote, won’t pick its Senator until a Nov. 27 runoff.

All of which is to say: There was a resettling of America’s politics this week. Voters in large numbers — 52 million and counting — decided House Democrats were the right roadblocks for Trump and said a record 100 women should be part of that mix. Voters booted Republicans from governors’ mansions in Michigan and Wisconsin, and held it in Pennsylvania, three states that were crucial for Trump’s 2016 win and his 2020 re-election bid. And the Senate, which began with Democrats facing a terrible uphill climb, is likely to fight to a draw.

Democratic activists and strategists are still debating — some, quite aggressively and publicly — what fueled their successes. All corners of the still-fractured Democratic Party were trying to claim credit, and there’s plenty of reason for each tribe to celebrate. Even so, the fight for credit suggests the silent 2020 presidential primary is already underway.

Still, the midterms were among the most divisive in recent memory.

One Trump ad — deemed too racially charged by several networks to air — suggested Democrats were inviting hordes of immigrants into the country illegally to commit crimes against Americans, including police officers. Another, from a House incumbent in California, linked a former official in Barack Obama’s White House to the Muslim Brotherhood. Robocalls into some Southern states appealed to racism in messages against African-American candidates.

They were also the most costly ever. The Center for Responsive Politics estimates the still-being-invoiced 2018 midterms cost a record $5.2 billion, a 35% increase over the last non-presidential federal cycle. Outside spending from groups like super PACs topped $1.3 billion.

And Trump, as he was leaving Friday for a quick weekend in Europe to attend a World War I memorial, suggested much of the process was rigged and Democrats had won only through shadiness.

“There’s a lot of bad stuff going on in this country, and we’re finding out, and I’m getting to the bottom of it. And I’ve done a hell of a job,” he said, offering no evidence for his assertions.

During the flight to Europe, Trump repeatedly tweeted baseless claims that the Florida vote counting was “election theft” and “potential corruption.” “How come they never find Republican votes?” he tweeted.

All of which could render Washington a morass for the next two years. Democrats are working out who will lead them, with Nancy Pelosi returning to the speaker’s role for the first time since 2011 and other leadership roles going to potential future speakers. Republicans appears to be retrenching, now more Trumpy than ever.

And yet, people from both parties in the Capitol would do well to dig into the numbers behind this week’s blue wave. Democrats had history on their side, and they did even better than the norm. Republicans were at a disadvantage, particularly because they could never keep focus on the growing economy because the president kept hijacking the national conversation.

And voters — in record numbers — decided they wanted to be part of the political process.

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.