LONDON — Boris Johnson, the tousle-haired leader of the Brexit campaign, became prime minister of the United Kingdom on Wednesday, promising — ‘‘no ifs or buts’’ — that Britain would leave the European Union in October.
‘‘The doubters, the doomsters, the gloomsters, they are going to get it wrong, again,’’ he said in his first remarks outside 10 Downing Street. ‘‘The people who bet against Britain are going to lose their shirts, because we’re going to restore trust in our democracy.’’
Johnson declared, ‘‘I have every confidence that in 99 days’ time we will have cracked it’’ and be able to exit the EU with ‘‘a new deal, a better deal.’’
He implicitly blamed his predecessor, Theresa May, for failing in that challenge.
‘‘After three years of unfounded self-doubt, it is time to change the record,’’ he said. ‘‘To recover our natural and historic role as an enterprising, outward-looking, and truly global Britain, generous in temper and engaged with the world.’’
Johnson made his name as a journalist known for exaggeration and then as a liberal Conservative London mayor. His supporters hope that, as prime minister, he will keep his promises.
After Johnson’s speech, Cabinet members began to shuttle into 10 Downing Street. Some of the meetings were brief. In all, 17 members of May’s government were either sacked or resigned or retired. The Daily Telegraph described the reshuffle as a ‘‘massacre.’’
Johnson cleared out ‘‘remainers’’ and in their place began to build a Cabinet of true Brexit believers. In three top jobs he named Priti Patel as home secretary, Dominic Raab as foreign secretary, and Sajid Javid as chancellor.
Jeremy Hunt, Johnson’s main opponent in the Conservative Party leadership race, was fired as foreign secretary. Hunt said he was offered another job in the administration but decided to return to the backbenches.
Earlier in the day, Philip Hammond, who oversaw Britain’s budget, resigned as chancellor of the exchequer. He had warned that he could not serve a prime minister who was prepared to take Britain out of the EU without a deal.
The transition of power in Britain’s parliamentary democracy is brutal — and lightning quick. May curtsied to Queen Elizabeth II on Wednesday afternoon and resigned. Minutes later, Johnson bowed and was asked to form a new government.
The dance began earlier in the day, when May appeared in the House of Commons for her last session of prime minister’s questions, a weekly exchange between the ruling government and the opposition, as tradition dictates, ‘‘two sword lengths apart.’’
Lawmakers thanked May for her service. They reserved their harshest lines for Johnson, whom opposition rivals called ‘‘flagrant’’ and ‘‘reckless,’’ a usurper with no mandate, and someone who is prepared to ‘‘sell our country out to Donald Trump and his friends.’’
May offered tepid support for her successor. She said she was ‘‘pleased’’ to hand over to Johnson, whom ‘‘I worked with when he was in my Cabinet,’’ and who is committed to delivering Brexit. Johnson notably quit May’s Cabinet over her Brexit approach.
When May herself came under attack in the House of Commons session, she gave as good as she got.
Labour Party leader Jeremy Corbyn laid into her — saying that, under her tenure, child poverty was up, pensioner poverty was up, school class size was up, food bank use was up. May retorted that she was proud of her record. She then lowered her head, eyeballed Corbyn, and poked him with her horns: ‘‘As a party leader who has accepted when her time was up, perhaps the time is now for him to do the same.’’
Although May had a relatively short tenure for a British prime minister, she noted that she had answered more than 4,500 questions over the course of 140 hours in the House of Commons.
May now returns to the backbenches of Parliament as an ordinary and not very influential lawmaker. This is far different from the tradition in the United States, where a former president scoots offstage to write memoirs, deliver speeches, and build a library. In May’s case, she will be back in the House of Commons after the summer recess, asking questions of Johnson.