See more of the story

Boris Johnson dramatically altered the landscape of British politics on Thursday night, ending a period of debilitating parliamentary gridlock and three years of uncertainty over Brexit. In doing so, the U.K. prime minister gave himself what his predecessor Theresa May could never have: the political space to define his country's departure from the European Union and address the social and economic frustrations that led to the 2016 Brexit vote.

In an election where constituency swings of as little as 5% could make a big difference, the movements went almost entirely the way of Johnson's Conservatives. In all, with some votes still being counted into Friday morning, the Tories looked set to win 364 seats for a whopping majority of 78. Long-held Labour seats in its former industrial heartlands, such as Workington in the northwest and Blyth Valley in the northeast, switched to the Tories — some for the first time in 70 or more years. Jo Swinson, leader of the anti-Brexit Liberal Democrats, lost her seat.

It was the Tories' fourth consecutive election victory, but by far its most decisive, handing Jeremy Corbyn's Labour its worst drubbing since 1935. If the hard-left Corbyn's time is up, Johnson's hour has come after many setbacks on his personal journey to power. While the consequences of his victory on two fronts — Brexit and domestic policy — are hard to overstate, so are the challenges he faces. In getting this election, Johnson found a trap door out of a parliamentary cage on Brexit, but he had to write a series of blank checks that will be hard to honor.

Three distinct advantages helped sweep Johnson back to Downing Street, and each will probably be short-lived. The first was, obviously, Brexit. Almost as soon as Johnson became party leader, he set about uniting the Brexit vote, squeezing Nigel Farage's Brexit Party until it ended up with no seats and successfully targeting the English Labour seats that voted Leave and were deeply uncomfortable with Corbyn's brand of metropolitan socialism. Even if Johnson couldn't honor his pledge to "die in a ditch" rather than extend the Oct. 31 Brexit deadline, voters gave him the benefit of the doubt. Nothing similar happened on the Remain side.

The deal Johnson struck with Brussels provides for a so-called hard Brexit; it represents a stark rupture from the obligations and access that E.U. membership offers. It was held up as a Houdini-like piece of statecraft, although in truth its terms were ones the E.U. had always been willing to give, but which May, Johnson and other Brexiters saw as unacceptable. It is only slightly less economically damaging than leaving without a deal, but crucially gives Britain the freedom to negotiate its own trade deals, which was totemic for Brexiters.

Having a deal allowed Johnson to win over most Brexit voters and many remain voters too. The campaign slogan "get Brexit done" appealed to both. Hardline Brexiters saw it as a promise nearly fulfilled, while weary remainers just wanted to ensure a no-deal Brexit was avoided and that the country could move on.

The second boon for Johnson was undoubtedly Corbyn. No politician could be luckier in his enemies than Johnson was. From his failure to tackle anti-Semitism within the Labour Party, to his baffling Brexit policy and an economic agenda that even left-wing voters found loopy, Corbyn proved himself unfit for office. A former Labour prime minister (Tony Blair), a number of former Labour MPs, the country's Chief Rabbi and other prominent voices urged Labour voters to abandon Corbyn — and they did in droves.

Finally, largely through his personal charisma, hardened tack on Brexit and promises to end the austerity of his Tory predecessors, Johnson became seen as the candidate of change. The Conservatives have been in government for nearly a decade — a time in which Britain has had deep spending cuts, rising rates of violent crime and homelessness, a crisis in affordable housing, wage stagnation and more recently, below trend growth rates. But Johnson managed to run as a first-term leader.

None of these three advantages will endure. After the imminent passage of his Brexit deal legislation, allowing the U.K. to leave officially by Jan. 31, Johnson has to conclude a trade agreement with the E.U., which he swore would be finished by the end of 2020. In that time-span, Brussels is unlikely to offer much unless Johnson agrees to Britain not diverging in key regulatory areas. Perhaps voters, and the media, will be so tired of Brexit — and so pleased that the formal break has been delivered — that his concessions won't attract notice. More likely, the terms of a trade deal, or an extension, will be contentious.

Johnson won't have Corbyn to make him look good either. Of course, the next leader may be as bad as the last one. If Labour doesn't abandon Corbynism — a highly ideological platform of soaking the rich, nationalizing industries and reckless fiscal promises — it will remain a soft target for Johnson, who in the meantime will be busy shoring up the goodwill of his ex-Labour constituencies with public spending of his own.

Finally, the longer Johnson spends in No. 10, the harder it will be to portray himself as the face of change. To be as successful in office as he's been in winning it, he'll have to knit together a set of economic policies that reflects the new Tory coalition spanning socially conservative, working class areas that are desperate for investment and the Tories' traditional "small state" and urban supporters; their interests are often in direct conflict.

Johnson's acceptance speech in the early hours of Friday spoke of "one-nation conservatism" and his plans to go beyond Brexit. But the Scottish National Party's impressive performance suggests even keeping the U.K. together will be an ongoing challenge. Johnson's answer may be to throw money at all problems. If not done properly, that could backfire.

Still, there's reason to cheer the end of the agonizing paralysis. The Conservative victory settles a once-in-a-generation argument over the country's course. Brexit will happen; Corbyn's socialist experiment won't.

There will be much reflection on the campaign itself, which was ugly at times. While Johnson won resoundingly, poll after poll showed trust in him was low. Indeed, Johnson is sharing the prize of power with the nationalist-populist forces that his campaigns have exploited. They will be hard to control. Johnson's career has demonstrated that he can change when it suits him. And yet it's also true that his changes are a matter of expedience rather than principle.

May dreamed of uniting her party, broadening its base and winning an election by a wide margin. Johnson did it. Now he just has to govern.

Therese Raphael writes editorials on European politics and economics for Bloomberg Opinion. She was editorial page editor of the Wall Street Journal Europe.