Two candidates will campaign to be the United Kingdom's next prime minister after two others were eliminated from the running on Thursday.

Jeremy Hunt and Boris Johnson are the only contenders left in the competition to take over from Theresa May, who announced her resignation last month after bowing to party pressure over the managing of Brexit.

Foreign Secretary Hunt secured the backing of 77 of the 313 Conservative Party lawmakers in the latest round of voting.

Brexiteer Johnson, former Mayor of London and foreign secretary, was backed by 160.

Home Secretary Sajid Javid and environment secretary Michael Gove fell out of the running after receiving the lowest number of ballots.

Johnson, considered the favorite in the race, tweeted: “I’m deeply honoured to have secured more than 50 per cent of the vote in the final ballot.

“I look forward to getting out across the UK and to set out my plan to deliver Brexit, unite our country, and create a brighter future for all of us.”

Hunt tweeted a statement on Thursday: “I'm the underdog - but in politics surprises happen as they did today.

“I do not doubt the responsibility on my shoulders - to show my party how we deliver Brexit and not an election, but also a turbo-charged economy and a country that walks tall in the world.”

He also congratulated Gove “on his campaign - energy, intellectual rigour and the passion of someone whose own story speaks to Conservative values as much as his superb oratory.”

Johnson and Hunt will now compete for support from around 160,000 members of the Tory Pary, with the winner due to be announced in the week of 22 July.

Gove said on Twitter that he is “naturally disappointed” and congratulated the two surviving candidates.

“It’s been an honour to be able to set out a vision for the future of our great country,” he added.

Javid tweeted that he was "truly humbled by the support" and added: "We ran to win, but I am incredibly proud of the race we have run together." EFE-EPA