Boris Johnson launched his premiership with a bid to do a bold new Brexit deal with the European Union by Oct. 31, rebuking "gloomsters" and the political class who he said had forgotten the people they should serve.

Johnson took office as U.K. prime minister on Wednesday, replacing Theresa May, who stepped down having failed to deliver a Brexit deal or implement many of the reforms she promised when taking office in 2016.

He comes to power at a time of national crisis, promising Britain will leave the European Union by the October deadline but with little sign that Brussels will bend to his demand to sweeten the terms of the country's departure.

"We are going to fulfil the repeated promises of Parliament to the people and come out of the EU on October 31 — no ifs or buts," he said.

"We will do a new deal, a better deal that will maximize the opportunities of Brexit while allowing us to develop a new and exciting partnership with the rest of Europe."

Prime minister 'of the whole U.K.'

In a 12-minute speech outside the glossy black door to the prime minister's residence at 10 Downing Street, Johnson delivered a thrusting rebuke to those who have criticized his planned approach as light on detail and heavy on rhetoric.

"The doubters, the doomsters, the gloomsters, they are going to get it wrong again," Johnson said, rocking up on the balls of his feet as he spoke.

"The people who bet against Britain are going to lose their shirts."

Casting aside his trademark clownish demeanor and rambling delivery, he followed a written script, setting out an ambitious agenda beyond Brexit — promising tax reform, a new social care system and an economic stimulus package.

"I will tell you something else about my job: It is to be prime minister of the whole United Kingdom, and that means uniting our country, answering at last the plea of the forgotten people and the left-behind towns," he said.

The Queen accepted Theresa May's resignation as prime minister on Wednesday morning.

Theresa May leaves 10 Downing Street for her final session in the House of Commons as prime minister in London on Wednesday. May resigned last month after Parliament repeatedly rejected the Brexit withdrawal agreement she struck with the European Union. (Tim Ireland/Associated Press)

After May's resignation, Johnson arrived at the palace to have an audience with the Queen, who requested he form an administration. His formal title is Prime Minister and First Lord of the Treasury.

Brexit government

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

The pound is weak, the economy is at risk of recession, allies are in despair at the Brexit crisis and foes are testing the the U.K.'s vulnerability.

His party has no majority in Parliament, so the Conservatives only govern with the support of 10 lawmakers from the Brexit-backing Democratic Unionist Party in Northern Ireland.

Johnson takes part in a tug of war with Armed Forces personnel at the 2015 launch of London Poppy Day during his tenure as mayor of London. (Jonathan Brady/PA via Associated Press)

While Johnson said he does not want an early election, some lawmakers have vowed to thwart any attempt to leave the EU without a divorce deal. Brexit Party Leader Nigel Farage said he was open to an electoral pact with Johnson, though Farage's party currently has no representation in Parliament.

Investors have been bracing to see who fills Johnson's cabinet, and several top appointments have already been made.

Sajid Javid has been promoted from interior minister to finance minister. Former aid minister Priti Patel, who resigned in 2017 over undisclosed meetings with Israeli officials, has been tapped to replace Javid as interior minister.

Dominic Raab, a staunch proponent of Britain leaving the EU who quit as Brexit minister last November in protest of May's Brexit deal, has been named foreign minister. Jacob Rees Mogg, another prominent Brexiteer, has been appointed the new Leader of the House of Commons.

Michael Gove, who also stood for the Tory party leadership, has been given the job of Chancellor of the Duchy of Lancaster. Gove has a long history with Johnson, whose 2016 leadership bid Gove was supposed to spearhead until he unexpectedly jumped into the race himself.

Ben Wallace and Liz Truss have been appointed defence minister and trade minister, respectively. Stephen Barclay remains as Brexit minister.

Jeremy Hunt, Johnson's rival for the leadership, was sacked as foreign minister and offered the defence minister position, but turned it down, Sky reported.

No deal?

If the EU refuses to negotiate a new Brexit deal by end of October, and Brexit happens regardless, it would send shock waves through the world economy and tip the world's fifth largest economy into recession or even chaos, investors warn.

Brexit without a divorce deal would roil financial markets and, some bankers warn, weaken London's position as a pre-eminent international financial centre.

Brexit supporters say those fears are overblown and the United Kingdom will thrive if cut loose from the European project, which they cast as a German-dominated bloc that is falling far behind its global competitors such as the United States and China.

"If he really wants a no-deal, he will get it. We will never push an EU member out but we can't stop him. More likely, his own Parliament would," one EU diplomat said.

"Johnson has been such a chameleon, he has reinvented himself so many times that it is hard to know what to expect really."

Another diplomatic source had an ominous warning: "My scenario is purgatory."