Boris Johnson has promised to lead Britain out of the EU with or without a deal by October 31.

Boris Johnson, the ebullient Brexiteer who has promised to lead Britain out of the European Union with or without a deal by Halloween, will replace Theresa May as prime minister after winning the leadership of the Conservative Party on Tuesday.

His victory catapults the United Kingdom towards a Brexit showdown with the EU and towards a constitutional crisis at home, as British lawmakers have vowed to bring down any government that tries to leave the bloc without a divorce deal.

Johnson, the face of the 2016 Brexit referendum, won the votes of 92,153 members of the Conservative party, to 46,656 for his rival, Foreign Secretary Jeremy Hunt.

May will leave office on Wednesday after going to Buckingham Palace to see Queen Elizabeth, who will formally appoint Johnson before he enters Downing Street.

The result is a spectacular victory for one of Britain's most flamboyant politicians, and places an avowed Brexit supporter in charge of the government for the first time since the United Kingdom voted to leave the EU in the shock 2016 referendum.

But Johnson - known for his ambition, mop of blonde hair, flowery oratory and cursory command of policy detail - takes office at one of the most tumultuous junctures in post-World War Two British history.

Divided Kingdom

The 2016 Brexit referendum showed a United Kingdom divided about much more than the European Union, and has fuelled soul-searching about everything from regional secession and immigration to capitalism, the legacy of empire, and modern Britishness.

Brexit, which has already toppled two Conservative prime ministers, will dominate.

Johnson has pledged to negotiate a new Brexit divorce deal with the EU to secure before Oct. 31. But if the bloc refuses, as it insists it will, he has promised to leave anyway - "do or die" - on Halloween.

It is a step that many investors and economists say would send shock waves through world markets and tip the world's fifth largest economy into recession or even chaos.

A Brexit without a divorce deal would also weaken London's position as the pre-eminent international financial centre while jolting the northern European economy.

Johnson's Conservatives have no majority in parliament and need the support of 10 lawmakers from Northern Ireland's Brexit-backing Democratic Unionist Party to govern.

Even then, the majority is wafer-thin - and some lawmakers have threatened to bring down the government, a step that would probably deepen Britain's political crisis and lead to an election.