Theresa May’s election gamble failed. Enticed by large leads in opinion polls, the British prime minister called an early election with the expectation of increasing the Conservative Party’s slim majority in Parliament. But the Conservatives lost seats, leaving no party with a majority, forcing her to find allies to remain in power.

Much of the instant reaction to the British election has focused on May’s failure and the complications she now faces in forming a government and moving the Brexit negotiations forward. But we suggest there are five takeaway lessons of the election:

1. Two-party tribalism has returned.

Throughout the campaign, Conservative leader Theresa May hammered home the message that it was a simple choice between her “strong and stable” leadership and the chaos of Jeremy Corbyn’s Labour Party. Labour adopted similar binary messages: “hope vs. fear” and “for the many and not the few.” The public responded, casting more than 80 percent of votes nationwide for the two main parties — for the first time in nearly 40 years. Even though the result is a setback for the Conservatives in terms of seats, the party still increased its share of the vote by 5.5 percent on the highest turnout (69 percent) since 1997.

Helped in part by the mechanics of the “first past the post” electoral system, third parties were squeezed in key Labour-Conservative battlegrounds. And both main parties benefited from the drop in support for other parties, especially the United Kingdom Independence Party (UKIP).

2. Britain is more polarized than ever.

The election exposed just how politically polarized Britain has become. Labour entrenched its support in the urban and more cosmopolitan cities while the Conservatives stockpiled votes in the more rural areas of England.

Key socio-demographic divisions by age and education played a significant part in the final outcome. Labour’s ability to retain and win seats in university towns, for instance, owed much to the mobilization of young and more educated people.

And Brexit featured heavily: There was a visible Brexit divide with the Conservatives winning Labour seats in districts that had a 60 percent “Leave” vote in last year’s referendum on the U.K.’s membership in the European Union. Conversely, “Remain” areas, particularly in London, backed Labour despite the party’s acceptance of Brexit, while the Liberal Democrats performed much better in strong Remain areas with larger numbers of educated voters than elsewhere.

The Scottish Nationalist Party (SNP), which held 56 of 59 seats in Scotland in the last Parliament, lost a third of its seats as voters backed away from the SNP pledge to hold a second referendum on Scottish independence. Labour, Conservatives and Liberal Democrats all gained votes and seats at the SNP’s expense, although the SNP still holds a majority of seats (35) in Scotland.

3. UKIP voters did not just migrate to the Conservatives.

The UKIP vote collapsed, especially in the key Labour-Conservative battleground seats. The pervasive narrative of UKIP voters tends to stress immigration as the main driver of their support. Hence, most UKIP voters who would shift were expected to be captured by the Conservatives’ hard line on immigration.

But the story is more complex. More UKIP voters seem to have actually shifted to Labour than expected. Jeremy Corbyn’s anti-establishment approach and personable style may have been the appeal, along with Labour’s promise to invest in public services and expand the U.K.’s social welfare protections.

4. The Conservatives should have done better at the polls.

The Conservatives only narrowly failed to gain an overall majority and Labour lost the election. Nonetheless, the voting fundamentals suggested that it should have been a much more clear-cut victory for the Conservatives.

Despite Theresa May’s poor campaign, polls universally showed that voters overwhelmingly preferred her over Jeremy Corbyn for prime minister — and found Conservatives far more credible on the economy than Labour. Moreover, voters trusted May’s party far more on key issues such as defense and national security, which featured prominently following the terrorist attacks in London and Manchester in the final days of the campaign. May was also seen as far more credible on being able to achieve Brexit, which topped many polls as the most important issue facing the country.

Yet all of these favorables did not translate into a majority for the Conservatives. The campaign mattered.

5. Mobilization efforts online and offline may have paid off.

That a lifelong political campaigner like Corbyn performed much better in the campaign than a politician who built her reputation in the past decade as someone who could run a large and complex government department is no surprise. But focusing solely on the merits of Corbyn and weaknesses of May misses a key point about the campaign. Labour were always going to find it difficult to overcome the anti-Labour bias of large sections of the print media.

The Conservatives saw great success with targeted video and Facebook advertising during the 2015 election, but Labour hit back hard. This year, Labour put great emphasis on online campaigning and mobilizing younger voters. Social media studies during the campaign suggested that Labour’s online activism was at an unprecedented scale in a British general election.

While it is at this stage difficult to infer a causal relationship in online activism and party support, this phenomenon is worth noting. Similarly, the sheer number of young voters involved on the ground in identifying and mobilizing supporters in key Labour-Conservative battlegrounds suggests that the online efforts must have played a part in shoring up the Labour vote — particularly in urban centers such as London and in university towns.

Moving beyond the headline smiles and tears of election night, both main parties have something to please and worry them. The Conservatives, despite their ill-judged campaign, still command the majority of support in large parts of England. Labour, meanwhile, managed to overcome many disadvantages to win over 40 percent of the vote with a campaign that enthused large sections of the electorate, but still remained a long way short of an overall majority.

David Cutts is professor of political science at the University of Birmingham.

Tim Haughton is associate professor and head of the department of political science and international studies at the University of Birmingham.