Nationalism might have won the day in British elections — but that may not be all good news for the Tories. Last night’s election returns all but guarantee that the UK will execute Brexit and leave the EU. It also all but guarantees that Scotland will pursue an exit of its own, and Northern Ireland may soon follow.

First, let’s look at the party gains and losses in last night’s results, which were a blowout win for Boris Johnson and Conservatives, but not just them:

That yellow bar belongs to the Scottish National Party (SNP), which puts Scots independence as its highest priority. The gain of 13 seats means that the fiercely pro-Remain SNP controls nearly every constituency in Scotland, some at the expense of Tories, who lost seven of their previous twelve seats in Scotland. SNP chief Nicola Sturgeon claimed the results as a mandate to keep Scotland in the EU, and to push for another independence referendum to achieve that goal:

"[Boris Johnson] has no mandate whatsoever to take Scotland out of the EU." SNP leader Nicola Sturgeon says Scotland's desire to stay in the EU has now been "emphatically confirmed" as she lays out plans to have a second referendum on Scottish independence https://t.co/Umridho0k6 pic.twitter.com/UdPUWvuhxJ — CNN International (@cnni) December 13, 2019

Sturgeon said on Friday the Conservatives had focused their campaign in Scotland on opposing a second referendum but had been roundly defeated, hit by a series of losses at the hands of the SNP in seats including Stirling, Angus and Gordon. “I don’t pretend that every single person who voted SNP yesterday will necessarily support independence, but there has been a strong endorsement in this election of Scotland having a choice over our future; of not having to put up with a Conservative government we didn’t vote for and not having to accept life as a nation outside the EU,” she said. SNP strategists said the significance of its victory, which has echoes of its remarkable landslide in 2015 when it won 56 seats, was given greater weight by the contrast with the election result in England where the Tories won a significant overall majority. By comparison, the Tories in Scotland had a very difficult election, holding only six of the 13 seats they won in 2017. Labour was humiliated, losing six of the seven seats they held to the SNP, belying the party’s confident claims in the final week of the campaign it would hold those seats and win several more.

The dramatic shift away from English parties does seem significant. Even the explicitly pro-Remain Liberal Democrats had a bad night in Scotland, losing the seat held by its now-former leader Jo Swinson. Scots voters rallied around nationalism, but their own nationalism in a backlash against the Tories and Westminster. If Sturgeon gets her referendum on independence, it’s likely to turn out much differently than it did five years ago, when EU membership wasn’t an issue. Scotland has throughout its history looked to Europe and especially France, and it’s clear that they are still extremely unhappy to have that political and cultural connection severed by the English.

That’s not the only place the United Kingdom might un-unite, either. For the first time ever, Irish nationalists won more parliamentary seats than unionists in Northern Ireland — even if most of the new MPs never take their seats:

Northern Ireland elected more Irish nationalists to Britain’s parliament than pro-British unionists for the first time on Friday, after the largest nationalist party Sinn Fein narrowly won the final of the region’s 18 seats. That meant Sinn Fein kept its seven seats and the resurgent fellow pro-Irish SDLP won two, combining to pass the Democratic Unionist Party, which fell from 10 seats to eight. The cross-community Alliance Party took the final seat, adding to the majority of anti-Brexit MPs after its share of the total vote rocketed by almost 10%.

Under the terms of the Good Friday Agreement, the UK has to agree to a referendum on Irish reunification if popular sentiment suggests it might pass. Sinn Féin’s gains in this election does more than suggest that the six-county enclave may be embracing Irish nationalism and republicanism more than ever. Johnson has another risk in Northern Ireland as well — his own Brexit deal essentially puts the enclave outside of the UK’s new sovereign trade and regulatory control. That will further undermine the British identity of the subjects in Northern Ireland, which poses a big political risk to Johnson even if he can shove that deal with its Irish Sea trade frontier through Parliament with his massive new majority.

This was always the risk with Brexit. The UK consists of four nations that have very mixed feelings about being part of the union, but membership in the EU papered over most of those issues. Now that the Tories have unleashed nationalism as a winning strategy — even and perhaps especially allowing for the good arguments in favor of national sovereignty and control — they have amplified those same desires in Scotland and Northern Ireland. Johnson may well end up being the first prime minister of England by the time this wave of nationalism plays all the way out.