OXFORD, England — Boris Johnson, who has promised to lead Britain out of the European Union at the end of October, opened a commanding lead over his rivals to replace Theresa May as prime minister on Thursday.

He won the votes of 114 out of 313 Conservative lawmakers in the first-round ballot. Three other candidates were eliminated for failing to achieve a minimum of 5% of votes cast.

Johnson, 54, the former foreign secretary, is expected to be the clear choice of Conservative rank-and-file members if — as now seems likely — he can make it to the final two names selected by MPs.

He said, "Thank you to my friends and colleagues in the Conservative & Unionist Party for your support. I am delighted to win the first ballot, but we have a long way to go."

His closest rivals after the first round are Jeremy Hunt, the foreign secretary, who won 43 votes, Michael Gove, the environment secretary, with 37 votes, and Dominic Raab, former Brexit minister.

The U.K. remains deadlocked over plans to leave the EU. Three years after voters opted 52% to 48% to quit the bloc, the government has yet to find support for an agreement that would ease its exit.

Johnson, who campaigned for the "leave" campaign, said this week he was prepared to leave on October 31 even if the government had failed to agree a deal.

However, MPs have indicated they will try to prevent a no-deal Brexit that could send shock waves through markets.

Andrea Leadsom, former leader of the House of Commons, Mark Harper, and Esther McVey were eliminated.

The next round of voting is due to be held on Tuesday, with further votes scheduled to reduce the number of candidates to two. The wider party will then be offered the final say in a postal ballot.