The battle – due to conclude in the week of 22 July – will be the first time in British political history that a prime minister has been put into No 10 by a vote of its party’s membership.
And there were fears that the new PM may not be in place in time to face scrutiny from MPs, and a possible no-confidence vote, before parliament begins its five-week summer break on 25 July.
Labour issued an immediate call for a general election, saying the nation’s prime minister should be chosen by voters and not “a handful of unrepresentative Conservative members”.
The precise number of people eligible to vote in the postal ballot is not known, but the party’s latest estimate of 160,000 represents just 0.34 per cent of the national electorate.
Recent analysis has suggested that a sizeable proportion of the 35,000 believed to have joined in the past year are former Ukip supporters hoping to influence the choice of a successor to Theresa May, and that as many as 59 per cent may have voted for Nigel Farage’s Brexit Party in last month’s European elections.
Both Mr Johnson and Mr Hunt go into the contest with a policy of negotiating an improved Brexit withdrawal deal which has been roundly rejected by Brussels.
And Mr Hunt is promising to seek an extension to the 31 October deadline for Brexit if necessary to secure agreement, a proposal to which Leo Varadkar, the Irish PM, said the remaining EU leaders were “enormously hostile” unless it leads to a general election or second referendum.
Runaway favourite Mr Johnson won the support of more than half of the 313 Tory MPs in the fifth and final round of voting at Westminster, with 160 voting for him.
Mr Hunt claimed second place on the ballot paper, pipping Michael Gove by just two votes, with 77 to the environment secretary’s 75.
Mr Gove – who also failed in a bid for prime minister in 2016 – had briefly leapfrogged the foreign secretary earlier in the day, as Sajid Javid, the home secretary, was knocked out in the fourth round of MPs’ votes.
He said he was “naturally disappointed” not to make it to the final two, but “so proud of the campaign we ran”.
The result sparked renewed speculation at Westminster about the possible “lending” of supporters by the Johnson camp to get the foreign secretary over the line.
Mr Hunt picked up 18 supporters to Mr Gove’s 14 after Mr Javid’s elimination put his 34 supporters up for grabs. The increase of three in Mr Johnson’s vote tally was fewer than the four Javid supporters who had announced during the day that they were switching to him.
The former London mayor was widely considered to prefer a run-off against Mr Hunt, who backed Remain in the 2016 EU referendum and has been portrayed by rivals as the “continuity May” candidate, rather than the long-time Brexiteer who fronted the Vote Leave campaign with him before sabotaging his previous bid for the leadership.
The Johnson camp rejected any suggestion of dirty tricks as “nonsense”.
And Hunt backer Greg Hands denied any lending of votes, saying: “I have seen no evidence of that – it was a contest fairly and squarely fought.”
Mr Gove’s campaign manager Mel Stride agreed: “We didn’t see a situation where – as some had speculated – a very large number of votes might have transferred from Boris Johnson to Jeremy Hunt.
“It would appear to me everybody has behaved pretty much as one would hope they would.”
Mr Hunt acknowledged he was the “underdog” in the national showdown, after polling suggesting his predecessor as foreign secretary is the favourite of Tory members.
But he insisted: “In politics surprises happen, as they did today.”
And he added: “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.”
Mr Johnson said he was “deeply honoured” to have secured the support of more than 50 per cent of Tory MPs, adding: “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.”
But Labour’s national campaign coordinator Andrew Gwynne said: “What a choice – the man who broke the NHS or the man who wants to sell it to Donald Trump.
“A handful of unrepresentative Conservative members should not be choosing our next prime minister. People should decide through a general election.”
A series of more than a dozen regional hustings will start in Birmingham on Saturday, with Ms May’s successor named in the week of 22 July. ITV will host a TV showdown between the two contenders on 9 July, which both Mr Johnson and Mr Hunt immediately said they will attend.
The contest will inevitably focus attention on the two candidates’ stances on Brexit.
Mr Johnson has promised to take Britain out of the EU, deal or no deal, by 31 October. But Mr Hunt has said that, while he would opt for no-deal over no Brexit, he is prepared to seek an extension to negotiations to secure an agreement with Brussels.
Brexit hardliner Dominic Raab rejected suggestions that Mr Johnson was softening his position, having declined to guarantee departure by the Halloween deadline during a TV debate, saying only that it was “eminently feasible”.
Mr Raab – who swung behind the former London mayor after being eliminated in the second round of voting – said Mr Johnson’s comment had been “over-interpreted”.
And he added: “I talked to him before I came out in support and he remained very clear on that commitment.”
Robert Buckland, a Johnson backer who voted Remain in the referendum, said: “My view is that Boris’s policy is to avoid a deliberate crash-out, he wants a deal”.
Mr Hands described the foreign secretary as “the man who can open the door in Brussels”, saying the Hunt camp “hope” to leave on 31 October. But he added: “We are not going to die in the ditch ... If it takes a bit longer, so be it”
In Brussels, Mr Varadkar said many of the EU27 leaders had “lost patience” with the UK, adding: “An extension could really only happen if it were to facilitate something like a general election in the UK, or even something like a second referendum, if they decided to have one. What won’t be entertained is an extension for further negotiations or further indicative votes. The time for that has long since passed.”
And Luxembourg’s PM Xavier Bettel said whoever wins the race to Downing Street “will have to deal with us on the agreement we have done with Theresa May”.
Mark Rutte, the Dutch prime minister, said there was no prospect of a time limit to the controversial backstop for the Irish border or the swift introduction of technological solutions, as the two candidates have proposed.
“With a hard Brexit – even with a normal Brexit – the UK will be a different country, it will be a diminished country,” said Mr Rutte. “It is unavoidable because you are no longer part of the European Union, and you are not big enough to have important enough position on the world stage.”
Opponents of Brexit voiced concern that the new PM may not be in place in time to face scrutiny from MPs - and a possible confidence vote – before parliament rises for its five-week summer break on 25 July.
After the dates of the summer recess were announced, Labour MP Owen Smith, a leading supporter of the People’s Vote campaign, said: “It is outrageous that this tattered government is planning to let Boris Johnson get five weeks without facing any sort of parliamentary scrutiny.
“The clock is ticking down on the precious extension negotiated with the EU in March. Before long we will be back on a cliff-edge so this is no time to head for the beach.”
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies