Boris Johnson became Britain’s new prime minister Wednesday, vowing to lead the U.K. out of the European Union “after three years of unfounded self-doubt.”

Standing outside the shiny black door of 10 Downing St., Johnson derided “the doubters, the doomsters, the gloomsters” who believe he cannot succeed in breaking the Brexit impasse that defeated his predecessor, Theresa May.

“The people who bet against Britain are going to lose their shirts,” he said.

Johnson has just 99 days to make good on his promise to deliver Brexit by Oct. 31, come what may.

The former mayor of London and foreign secretary is getting Britain’s top job in politics after winning a contest to lead the governing Conservative Party.

Famed for his bravado, quips in Latin and blond mop of hair, Johnson easily defeated Conservative rival Jeremy Hunt, winning two-thirds of the votes of about 160,000 party members across the U.K.

He replaces May, who announced her resignation last month after Parliament repeatedly rejected the withdrawal agreement she struck with the 28-nation bloc. That has left Britain stranded in Brexit limbo as the U.K.’s departure from the EU was delayed past its long-scheduled March exit date.

Johnson took office in a day of carefully choreographed political drama that began with May attending the weekly Prime Minister’s Questions period in the House of Commons for the last time.

The usually boisterous session was subdued, with Conservative colleagues praising May’s sense of duty and opposition leaders offering best wishes, while aiming their fire at her replacement. May just shook her head when Labour Party leader Jeremy Corbyn asked if she would help him stop “the reckless plans of her successor,” who has vowed to leave the EU if necessary without a Brexit divorce deal.

May offered Johnson slightly muted praise, saying she was pleased to hand over to a Conservative committed to “delivering on the vote of the British people in 2016 and to delivering a bright future for this country.”

And she fired back at Corbyn: “As a party leader who has accepted when her time was up, perhaps the time is now for him to do the same?”

As she left the Commons chamber, May was given a standing ovation by Conservative lawmakers, many of whom helped bring her down by rejecting her Brexit deal.

After saying goodbye to Downing Street staff, May stood outside the prime minister’s residence and spoke publicly for the last time as Britain’s leader.

With husband, Philip, by her side, May said it had been “the greatest honor” to serve as prime minister.

Reminding her successor of the risks posed by a disruptive Brexit, May said the new government’s priority must be “to complete our exit from the European Union in a way that works for the whole United Kingdom.”

May and her husband then traveled by ministerial Jaguar the mile (1.6 kilometers) to Buckingham Palace to advise Queen Elizabeth II to ask Johnson to form a new government. The palace confirmed in a statement that the 93-year-old monarch had accepted May’s resignation.

May left the palace after a half-hour. Moments later, Johnson’s car swept through the gates of the royal residence. He will be the 14th prime minister of the queen’s 67-year reign.

There was a brief hiccup in the smooth handover when environmental protesters blocked Johnson’s car by forming a human chain across the road outside the palace. They were quickly bundled aside by his police escort.

Greenpeace said its activists had tried to hand Johnson a letter calling for strong action against climate change.

Half an hour later, Johnson spoke in Downing Street, giving Britons a glimpse at his priorities and policy plans.

It was classic Johnson: upbeat but vague, a scattershot spray of promises from more police on the streets to better broadband to high animal welfare standards — and “a new deal, a better deal” on Brexit.

Now the real battle starts.

Johnson has vowed that Britain will leave the EU on Oct. 31, with or without a deal on departure terms. Economists warn that a no-deal Brexit would disrupt trade and plunge the U.K. into recession, and the EU is adamant that the deal it made with May will not be renegotiated.

Chief EU Brexit negotiator Michel Barnier said “we are ready to listen and to work with” Johnson, but did not budge on the bloc’s refusal to alter the deal.

“A no-deal Brexit will never be, never, the choice of the EU. But we are prepared,” he said in Brussels.

Johnson, whose personal brand is built on optimism — and, critics say, an ambiguous relationship with facts — promised Tuesday to deliver Brexit “in a new spirit of can do.”

“I say to all the doubters: ‘Dude, we are going to energize the country, we are going to get Brexit done,'” he said.

To succeed, Johnson must win over the many Britons opposed to Brexit and resistant to his blustering charms.

In a sign he hopes to move beyond the largely white, male and affluent Conservative members who chose him as their leader, Johnson’s office said his government would be a “Cabinet for modern Britain” with more women and a record number of ministers from ethnic minorities.

His administration is also set to include some pro-EU politicians, but many members will be strong Brexit supporters like Johnson. One of his senior advisers is set to be Dominic Cummings, lead strategist for the “Vote Leave” campaign in the 2016 EU membership referendum.

A contentious figure, Cummings was found to be in contempt of Parliament earlier this year for refusing to give evidence to a committee of lawmakers investigating “fake news.”

Several senior members of May’s government who oppose a no-deal Brexit resigned Wednesday before they could be fired by Johnson. Treasury chief Philip Hammond, International Development Secretary Rory Stewart and Justice Secretary David Gauke all quit, along with David Lidington, who was May’s deputy prime minister.

Hunt also said he is stepping down from his foreign secretary position after losing the top spot to Johnson. Dominic Raab has been named as Hunt’s replacement.

“Given Boris’s stated policy of leaving the EU by October 31 at all costs, I am not willing to serve in his government,” Gauke said in his resignation letter.

Johnson appointed Sajid Javid as the country’s new Treasury chief, one of the most senior jobs in Cabinet.

Javid will be responsible for spending and economic policy in Johnson’s government.

Javid, a former banker and ex-home secretary, is the first ethnic minority politician to hold the post of Chancellor of the Exchequer.

Priti Patel was named home secretary, replacing Javid.

© The Associated Press. All rights reserved.