LONDON -- Boris Johnson, Britaininfo-icon's brash former foreign secretary, on Tuesday won the contest to succeed Prime Minister Theresa May, with his party handing the job of resolving the country's three-year Brexit nightmare to one of the architects of the project, and one of the country's most polarizing politicians.

Mr. Johnson beat Jeremy Hunt, his successor as foreign secretary, in the battle for the leadership of Britain's governing Conservative Party, winning 66 percent of the postal vote held among its membership. Although the Conservatives' working majority in Parliament is very small, it appears to be enough to ensure that Mr. Johnson will succeed Mrs. May as prime minister on Wednesday.

He would take office at one of the most critical moments in Britain's recent historyinfo-icon, immediately facing the toughest challenge of his career, to manage his nation's exit from the European Unioninfo-icon in little more than three months. But his policy swerves, lack of attention to detail and contradictory statements leave the country guessing how things will unfold.

"I know that there will be people around the place who will question the wisdom of your decision, and there may even be some people here who still wonder quite what they have done," Mr. Johnson told the party meeting in London on Tuesday at which the vote results were announced.

While he has a mandate from his party's dues-paying members, the hard facts that brought down Mrs. May have not changed: deep divisions on Brexit among Conservatives in Parliament, implacable opposition from other parties, and the insistence of European officials that they will make no major concessions.

Mr. Johnson has doubled down lately on Brexit, promising to take Britain out of the European Union by the Oct. 31 deadline "do or die," if necessary risking the economic dislocation of leaving without any agreement, rather than seek an extension.

"We're going to get Brexit done on Oct. 31, we're going to take advantage of all the opportunities that it will bring in a new spirit of can-do, and we're once again going to believe in ourselves," he promised on Tuesday. "Like some slumbering giant, we're going to rise and ping off the guy-ropes of doubt and negativity."