LONDON -- Britain's Conservative Party on Wednesday chose former Treasury chief Rishi Sunak and Foreign Secretary Liz Truss - a fiscal moderate and a low-tax crusader - as the two finalists in a party election to replace departing Prime Minister Boris Johnson.

The result came just after the divisive, unrepentant Johnson, who has plunged his party into turmoil, ended his final appearance in Parliament as prime minister with the words 鈥淗asta la vista, baby.鈥

Sunak and Truss came first and second respectively in a secret vote by Conservative lawmakers. Trade Minister Penny Mordaunt came in third and was eliminated.

The race, which has already produced bitter Conservative infighting, pits Sunak, who steered Britain's economy through the pandemic before quitting Johnson's government this month, against Truss, who has led the U.K.'s response to Russia's invasion of Ukraine.

The two contenders will spend the next few weeks campaigning for the votes of about 180,000 Conservative Party members around the country, who will vote by postal or online ballot. The winner of the party leadership vote will be announced Sept. 5 and will automatically become Britain's next prime minister.

Sunak won all four rounds of elimination votes by lawmakers, but is less popular with the party's grassroots, partly because of his previous job as Britain's chief taxman.

Truss, who has taken a tough line against Russian President Vladimir Putin - and with the European Union - is a favorite of the Conservatives' right wing.

Truss said if she becomes prime minister 鈥淚 would hit the ground running from day one, unite the party and govern in line with Conservative values.鈥

Sunak's campaign said 鈥渢he choice for members is very simple: who is the best person to beat Labour at the next election? The evidence shows that's Rishi.鈥

The winner of the Tory contest will not have to face British voters until 2024, unless they choose to call an early general election.

The campaign has already exposed deep divisions in the Conservative Party at the end of Johnson's scandal-tarnished three-year reign. Truss has branded Sunak a 鈥渟ocialist鈥 for raising taxes in response to the economic damage wrought by the coronavirus pandemic and the war in Ukraine. Sunak has hit back, saying that rivals including Truss were peddling economic 鈥渇airy tales鈥 to British voters as the country faces soaring inflation and economic turbulence.

Johnson allies have been accused of lobbying against Sunak, whose resignation helped bring the prime minister down, and in favor of Truss, who remained loyal. That impression was cemented Wednesday when Johnson said his advice to his successor would be not always to listen to the Treasury.

All the contenders -- there were 11 to start - sought to distance themselves from Johnson, whose term in office began boldly in 2019 with a vow to 鈥済et Brexit done鈥 and a resounding election victory, but is now ending in disgrace.

Johnson quit July 7 but remains caretaker leader until the party elects his successor.

On Wednesday, he faced derisive opposition politicians and weary Conservatives at his last Prime Minister's Questions session in the House of Commons, which adjourns for the summer on Thursday.

It was a downbeat departure, with supportive Conservative lawmakers lobbing praise and opposition politicians offering variations on 鈥済ood riddance.鈥

Johnson extolled what he called his accomplishments - leading Britain out of the EU and through COVID-19, and supporting Ukraine against Russia's invasion - and declared: 鈥淢ission largely accomplished, for now,鈥 before departing with Arnold Schwarzenegger's 鈥渉asta la vista鈥 catchphrase from 鈥淭erminator 2.鈥

Opposition Labour Party leader Keir Starmer said: 鈥淚 will miss the delusion.鈥

Johnson clung to office through months of scandals over his finances and his judgment, refusing to resign when he was fined by police over government parties that broke COVID-19 lockdown rules. He finally quit after one scandal too many - appointing a politician accused of sexual misconduct - drove his ministers to resign en masse.

Despite remaining prime minister, he has largely disappeared from the scene, even as Britain faces a summer cost-of-living crisis and labor discontent as inflation hits 9.4%.

Johnson did not attend any government emergency meetings about the heat wave that brought record temperatures of 40 degrees Celsius (104 Fahrenheit) to Britain this week. Last week he took a ride in a Royal Air Force Typhoon fighter jet, with 鈥淭op Gun鈥-style footage released by his office, then threw a weekend party at Chequers, the country house that comes with the prime minister's job.

London Mayor Sadiq Khan accused Johnson of wanting to 鈥渂ecome Tom Cruise鈥 and urged him to resign immediately.

鈥淲e need a full-time prime minister looking after our country rather than somebody who's checked out,鈥 Khan said.