LONDON—The contest to find a new British prime minister is throwing up an unusual twist: Conservative lawmakers are coalescing behind former Chancellor of the Exchequer Rishi Sunak, a candidate that the party’s wider membership don’t appear to like.

Mr. Sunak on Tuesday was within striking distance of getting enough Tory lawmakers to back him into the next round of the contest, where he and another opponent will tour Britain wooing 150,000 Conservative Party members. Those members vote to choose the next prime minister, with a winner announced on Sept. 5.

The problem for Mr. Sunak: Tory members aren’t sold on him. A poll by YouGov on Tuesday showed that Mr. Sunak would easily lose to both his potential opponents, Foreign Secretary Liz Truss and wild-card choice Penny Mordaunt, in a vote from party members. Ms. Truss is now the oddsmakers’ favorite to become leader.

Foreign Secretary Liz Truss is now the British oddsmakers’ favorite to become the next prime minister.

Photo: Chris Ratcliffe/Bloomberg News

The disconnect between Conservative lawmakers and party members adds further uncertainty to an already unpredictable race. Conservative lawmakers whittled down the shortlist of candidates to three on Tuesday. Mr. Sunak continued to lead the pack with 118 endorsements, two shy of securing a place in the next round. Ms. Mordaunt is in second with 92 votes and Ms. Truss is closing the gap with 86 votes, as the right of the party coalesces around her. The final round of lawmaker votes takes place Wednesday afternoon, where the shortlist is cut to a final two.

Mr. Sunak, whose resignation as treasury chief this month triggered the end to Prime Minister Boris Johnson’s tenure in Downing Street, has put in a controlled performance so far. During several debates the former hedge-fund manager has tried to calmly argue against radical tax cuts espoused by his opponents and defend the government’s economic record. The 42-year-old, who backed Brexit, is seen by his supporters in the Conservative Party as an earnest pragmatist who can steer the country through spiraling inflation and the looming threat of stagflation.

The question he faces now is can he connect with the voter base that Mr. Johnson built during a 2019 election victory. That included many working-class voters who had historically never voted Conservative but backed Brexit.

Mr. Sunak’s problem, some say, is that he is too rich to appeal to those working-class voters. Mr. Sunak’s wife, Akshata Murty, is the daughter of an Indian billionaire businessman. The Sunday Times newspaper estimates Mr. Sunak and Ms. Murty’s wealth is nearly $900 million, more than any other lawmaker in British Parliament. Ms. Murty recently had to change her tax arrangements after admitting she benefited from a tax regime that allowed her to pay no U.K. tax on her worldwide income.

“This guy has no real knowledge of how real people live,” said John Strafford, chairman of the Campaign for Conservative Democracy, which represents some of the party members. Mr. Strafford worries that Mr. Sunak won’t appeal to voters in working-class parts of the country and won’t cut the size of the state. On Saturday, Mr. Sunak visited a building site in northern England wearing a pair of Prada loafers.

Mr. Sunak has repeatedly argued that his rise to wealth embodies the meritocratic values of the Conservative Party. His grandparents immigrated in the 1960s and are originally from India. His mother ran a pharmacy in southern England and his father was a doctor. Mr. Sunak, a Hindu, attended an elite British private school and then went on to work for Goldman Sachs.

It was while working on an M.B.A. at Stanford that he met his future wife.

“My father-in-law came from absolutely nothing and just had a dream and a couple of hundred pounds that my mother-in-law’s savings provided him,” Mr. Sunak said on Sunday. “And from that, he went to build one of the world’s largest, most-respected companies, that, by the way, employs thousands of people here in the United Kingdom.”

Penny Mordaunt is one of three finalists looking to reach a runoff to lead the U.K. Conservative Party.

Photo: HENRY NICHOLLS/REUTERS

YouGov, the pollster, says many Conservative party members primarily want their next leader to be honest and have integrity, which may be linked to Mr. Johnson’s scandal-hit tenure. Of secondary importance is a return to “conventional conservatism,” which entailed a range of measures including tax cuts and a small state.

If, as expected, Mr. Sunak does make it to the last round, much will depend on how he fares during a monthlong campaign to attract members. Ms. Truss has promised to finance tax cuts by refinancing existing government debt over a longer time period. Mr. Sunak has argued that would blow a hole in U.K. government finances. He wants to get inflation under control before cutting taxes. Ms. Mordaunt is seen as more liberal and potentially an easier candidate to beat but is able to market herself as a fresh start for the party.

Much could come down to who can win an election. On Sunday, pollster Opinium found that 46% of Britons thought Mr. Sunak or Ms. Mordaunt would be a good prime minister. That dropped to 35% for Ms. Truss.

Write to Max Colchester at max.colchester@wsj.com