LONDON — Leading lawmakers from Britain’s governing party battled over Brexit as the contest to become the next Conservative prime minister officially kicked off Monday with the declaration of 10 candidates for the top job.

The choice of who will replace Prime Minister Theresa May affects all Britons, but will be made only by members of the right-of-center Conservative Party.

After the 5 p.m. close of nominations, party officials announced the names of the 10 lawmakers who are running, including former Cabinet minister Boris Johnson, Foreign Secretary Jeremy Hunt and Environment Secretary Michael Gove. An 11th, Sam Gyimah, withdrew because he was unable to secure the support of eight colleagues as required by party rules.

The winner will face the challenge of breaking Britain’s impasse over Brexit, an issue that has bedeviled politicians for three years and ultimately defeated Theresa May.

May stepped down Friday as Conservative leader after failing to secure Parliament’s backing for her EU withdrawal deal. She will remain caretaker prime minister until the party picks its new leader, a process that could run until late July.

Many of the candidates have been campaigning unofficially for weeks, laying out policies on everything from policing to tax, and facing questions about past drug use. But the overriding issue is Brexit.

The Conservatives have been hammered in recent European and local elections as voters punish the party for failing to leave the 28-nation EU.

“Our failure to deliver Brexit has put our country and party in grave peril,” Hunt said as he officially launched his campaign on Monday. “Without Brexit there will be no Conservative government and maybe no Conservative Party.”

The candidates divide into those, including Hunt and Gove, who say they will prioritize finding a divorce deal that’s acceptable both to the EU and to Parliament, and hard-core Brexit backers such as Johnson who say the U.K. must leave on the scheduled date of Oct. 31 — with or without a deal.

Gove, one of the front-runners, is trying to limit fallout from his admission of long-ago cocaine use, which brought allegations that the former justice secretary — who oversaw a system that sends drug users to prison — is a hypocrite.

“I’ve acknowledged that I made a mistake,” Gove said, adding that as justice secretary he was a reformer who sought to rehabilitate prisoners and “take broken lives and put them back together.”

Most of the other contenders have also confessed to occasional past use of drugs.

The contest’s winner will be chosen in a two-stage process. First, the 313 Conservative lawmakers will vote in a series of rounds starting Thursday, with the worst performers dropping out until only two candidates remain. The final two will be put to a postal vote among the 160,000 Conservative Party members in the country.

The favorite on betting markets is Johnson, a former foreign secretary.