Boris Johnson was elected by members of the governing Conservative party to be their next leader.

Boris Johnson began putting together his top team as he prepared to take over as Britain's prime minister on Wednesday, on a mission to deliver Brexit by October 31 by any means necessary.

The former London mayor, a divisive figure best known for his gaffes and rhetorical flourishes, was elected on Tuesday by members of the governing Conservative party to be their next leader.

He will be formally named as prime minister during a visit to Queen Elizabeth II at Buckingham Palace.

With just over three months before Britain is due to leave the European Union, the 55-year-old has no time to lose and is expected to swiftly announce his cabinet and advisers.

His first move was to appoint as a top aide Dominic Cummings, the Brexit campaign chief in the 2016 EU referendum, in which Johnson played a leading role.

May resigned after failing to get her plan for leaving the EU through parliament, forcing her to twice delay Britain's departure date.

Johnson has vowed to renegotiate her deal or take Britain out of the bloc at the next deadline, October 31, without a deal.

But the EU refuses to reopen the text, while some of his own MPs say they would rather bring down his government than accept a damaging "no deal" exit.

Ahead of May's resignation, a raft of her pro-EU ministers stepped down before Johnson takes over.

Finance minister Philip Hammond, who has promised to resist any attempts to force through a no-deal Brexit, said the new prime minister should be free to choose someone who was "fully aligned" with his views.

Justice secretary David Gauke and international development secretary Rory Stewart also stepped down.

The pound barely moved on Wednesday, with investors keen to see whether Johnson pushes ahead with a no-deal divorce.

Cabinet shake-up

Johnson has never hidden his ambition for power, using his trademark jokes and bluster to pull off unlikely electoral victories, but he takes over at a time of immense upheaval.

May became prime minister three years ago promising to deal with the "burning injustices" in society, but her time in office was dominated by Brexit wrangling.

She leaves behind a divided Conservative party -- and country -- and a government with only a wafer-thin majority in parliament.

Hammond has condemned Johnson's willingness to accept a "no deal" exit as deeply irresponsible.

During May's final appearance in parliament on Wednesday, opposition Labour leader Jeremy Corbyn urged her to join him and Hammond to "oppose the reckless plans of her successor". She shook her head.

Despite having forced her out, Conservative MPs enthusiastically cheered May, who will later make a short statement outside Downing Street before visiting the queen to resign.

Johnson was elected overwhelmingly by Conservative party members but is not as popular among the wider public.

A survey by the YouGov polling institute on Wednesday found his approval rating was just 31 percent.

During his victory speech on Tuesday, Johnson urged Britain to "ping off the guy-ropes of self-doubt and negativity" and vowed to unite the country.

A source in his campaign team said he would build a diverse cabinet with more women and a record number of ethnic minority politicians.

Sajid Javid, the son of a Pakistani immigrants and currently May's interior minister, has been widely tipped to take over at the Treasury.

Brexit supporter Priti Patel, who May sacked as international aid minister for unauthorised contacts with the Israeli government, is also likely to get a top job.

"Britain Trump"

Questions remain over Johnson's rival in the leadership contest, Foreign Secretary Jeremy Hunt.

His job is highly sensitive, as Britain is currently embroiled in a stand-off with Iran after Tehran seized a UK-flagged tanker in the Gulf last week.

May's government also provoked the ire of US President Donald Trump this month with the leak of diplomatic cables criticising the White House.

Johnson has emphasised the importance of Britain's relations with the United States.

And Trump was one of the first to congratulate Johnson on his victory, saying he would be "great" and describing him as "Britain Trump".

Trump suggested Johnson would work together well with anti-EU figurehead Nigel Farage, whose Brexit Party has taken a big chunk of eurosceptic votes from the Conservatives.

Johnson has ruled out any electoral pact.