LONDON — Brexit hardliner Boris Johnson has won the race to lead Britain's governing Conservative Party, and will become the country's next prime minister.

He defeated his rival Jeremy Hunt overwhelmingly in a vote of Conservative Party members.

He will be installed as prime minister in a formal handover from Theresa May on Wednesday.

The victory is a triumph for the 55-year-old Johnson, an ambitious but erratic politician whose political career has veered between periods in high office and spells on the sidelines.

Johnson has vowed that Britain will quit the European Union, "come what may," on the scheduled Brexit departure date of Oct. 31 even if it means leaving without a divorce deal

But he faces a rocky ride from a Parliament determined to prevent him from taking the U.K. out of the bloc without a withdrawal agreement.

He will be installed as prime minister in a formal handover from May on Wednesday.

May stepped down after Britain's Parliament repeatedly rejected the withdrawal agreement she struck with the 28-nation bloc. Johnson insists he can get the EU to renegotiate — something the bloc insists it will not do.

If not, he says Britain must leave the EU on Halloween, "do or die."

U.S. President Donald Trump tweeted a congratulations to Johnson.