Rishi Sunak and Liz Truss will battle it out in the coming weeks to be the UK's next prime minister.
The former chancellor and the Foreign Secretary finished in the top two places after five rounds of voting by Tory MPs.
Penny Mordaunt was today eliminated from the race after a bitter contest in Westminster.
Mr Sunak, the frontrunner throughout the parliamentary leg of the contest, received 137 votes in the final round of voting. Ms Truss won 113 votes, narrowly pushing Ms Mordaunt into third place on 105.
Mr Sunak and Ms Truss will now face a campaign to win the votes of Tory members, with the result of the contest announced on 5 September.
The winner is expected to replace Boris Johnson as prime minister the following day.
Graham Brady, the chairman of the 1922 Committee of Conservative backbenchers, read out the results this afternoon before the final two face their next electorate: the Tory membership.
Earlier in the House of Commons, Boris Johnson rounded off his final Prime Minister's Questions by hailing the successes of his time in office.
Ms Truss thanked supporters and said she embraced the opportunity to travel around the UK to sell her vision for tax cuts and growth to Tory members who will pick the next prime minister.

In a statement, she said: "I would like to thank each and every one of my colleagues who have supported me throughout this stage of this contest.
"I would also like to pay tribute to every candidate who stood for the leadership. Each of them has contributed enormously to the Conservative Party and to public life.
"I am excited to now take to the country to make the case to the Conservative Party about my bold new economic plan that will cut taxes, grow our economy and unleash the potential of everyone in our United Kingdom.
"As prime minister I would hit the ground running from day one, unite the party and govern in line with Conservative values.
"I am incredibly proud to be a part of the Conservative and Unionist Party and am excited to spend the next few weeks proving to all of our brilliant members exactly why I am the right person to lead it, and our great nation."
Ms Truss and Ms Mordaunt battled to win over Kemi Badenoch's supporters after she was knocked out of the contest, and face frontrunner Mr Sunak in the run-off.
Mr Sunak's campaign focused on polls showing that he could beat Labour leader Keir Starmer and "is the candidate the public think would make the best PM".

In a video message Mr Sunak told supporters "I won't let you down".
The former chancellor said: "I'll work as hard as I can to get our message out to the country.
"We need to restore trust, rebuild the economy and reunite our country.
"I'm confident that we can do that and we've got a really important positive message to take out to all our members now - crucially, who is the best person to beat Keir Starmer and the Labour Party at the next election?
"I believe I'm the only candidate who can do that."
Mr Sunak's campaign said he had secured a "clear mandate" from Tory MPs and will now "work night and day" to win the backing of the Conservative membership.
A statement read: "This is a really strong result with a clear mandate from MPs.
"He will now work night and day to get the mandate from the wider Conservative party family to beat Labour, protect the Union and seize the opportunities of Brexit.
"The choice for members is very simple: who is the best person to beat Labour at the next election? The evidence shows that's Rishi."
Rishi Sunak vs Liz Truss: Key policy differences
Ms Truss received a surge in support in the penultimate ballot, putting her within touching distance of Ms Mordaunt as the right of the party appeared to coalesce around her.
Who the Tory membership favours is hard to judge because of the low levels of participation in existing polling.
The current size of the Conservative membership is unknown, but at the last leadership election in 2019 there were around 160,000 members, and insiders expect it to have grown, meaning the polling is not representative of the party.
A former adviser to Prime Minister Theresa May has said Ms Truss is "probably the front-runner" to succeed Mr Johnson.
Peter Cardwell, who advised four ministers at different times and is now political editor with Talk Radio in Britain, said this evening there will be "anger" towards Mr Sunak for his resignation two weeks ago which helped prompt Mr Johnson's departure from Downing Street.
Mr Cardwell told RTÉ's Drivetime that Ms Truss remained in the cabinet after Mr Sunak and others resigned.
He predicted that Mr Sunak will do "a media blitz" next week as "the more people see of him, the more they like him".
Ms Truss is "more right-wing" and all about low taxation, he said, while Mr Sunak has warned that lowering taxes could have a negative impact on inflation.
Meanwhile Labour's shadow health secretary Wes Streeting tweeted: "Our next prime minister will be someone who propped up Johnson, voted for every one of his 15 tax rises, and parroted his lies.
"After 12 years of Conservative failure they expect to more time to fail. Their time is up. Only Labour offers the fresh start that Britain needs."
What's next in the process?
July-September: The run-off
The two candidates campaign and hold hustings among party members to win their votes. Members can vote by post or online, with the last vote received the one that counts if there is any duplication. Ballots must be received by 1600GMT on 2 September.
5 September: New prime minister announced
The party announces who has been elected by members as the new leader. The candidate with the most votes wins.
6 September: Johnson resigns
Johnson is expected to leave office on 6 September, his spokesman said, adding that he would go to Buckingham Palace to tender his resignation to Queen Elizabeth II.