Britain, blanketed by cool, damp weather, has seemed like one of the few places in the Northern Hemisphere not sweltering this summer. Yet a fierce political debate over how to curb climate change has suddenly erupted, fueled by economic hardship and a recent election surprise.

The surprise came last week in a London suburb, Uxbridge and South Ruislip, where the Conservative Party held on to a vulnerable seat in Parliament in a by-election after a voter backlash against the expansion of a low-emission zone, which will penalize people who drive older, more polluting cars.

The Conservatives successfully used the emission zone plan as a wedge issue to prevail in a district they were forecast to lose. It didn’t go unnoticed in the halls of Parliament, where even though lawmakers are in recess, they have managed to agitate over environmental policy for four days running.

Britain’s Conservative government is now calling into question its commitment to an array of ambitious emissions-reduction targets. Tory critics say these goals would impose an unfair burden on Britons who are suffering because of a cost-of-living crisis. Uxbridge, they argued, shows there is a political price for forging ahead.

With a general election looming next year, the Tories also see an opportunity to wield climate policy as a club against the opposition Labour Party, which once planned to pour 28 billion pounds, or about $36 billion, a year into green jobs and industries but scaled back its own ambitions amid the economic squeeze.

On Monday, Prime Minister Rishi Sunak said he would approach environmental policies in a “proportionate and pragmatic a way that doesn’t unnecessarily give people more hassle and more costs in their lives.”

It was a strikingly circumspect statement given Britain’s self-proclaimed leadership in climate policy, which goes back to Margaret Thatcher and includes hosting the annual United Nations climate conference in 2021. And it clearly reflected the new political thinking in the aftermath of the Uxbridge vote.

Government officials insist Mr. Sunak is not giving up on a ban on the sale of fossil-fuel-powered cars by 2030. Britain remains committed to a benchmark goal of being a net-zero — or carbon neutral — economy by 2050, which is enshrined in law. But on Tuesday, a senior minister, Michael Gove, said he wanted to review a project to end the installation of new gas boilers in homes.

Even before Mr. Sunak’s comments, critics contended that Britain’s historically strong record on climate policy had been waning.

The Climate Change Committee, an independent body that advises the government, recently said Britain “has lost its clear global leadership position on climate action.” The group cited the government’s failure to use the spike in fuel prices to reduce energy demand and bolster renewables. It also noted Britain’s consent for a new coal mine, and its support for new oil and gas production in the North Sea.

Last month, Zac Goldsmith quit as a minister with a climate-related portfolio, blaming “apathy” over the environment for his departure, though he was also a close ally of the former prime minister, Boris Johnson. In a letter to Mr. Sunak, Mr. Goldsmith wrote, “The problem is not that the government is hostile to the environment, it is that you, our prime minister, are simply uninterested.”

Climate experts said Britain’s economic troubles fractured what had been a broad political consensus on the need for aggressive action. The schism isn’t just between the two main parties: Even within the Conservative and Labour parties, there are fissures between those who continue to call for far-reaching goals and those who want to scale back those ambitions.

“This used to be an issue of across-party consensus; now it is not,” said Tom Burke, the chairman of E3G, an environmental research group. “The Tories have gone out of their way to turn it into a wedge issue, and I think that’s a mistake.”

In Uxbridge, however, the strategy worked. The district, with its leafy streets and suburban homes, has one of the capital’s highest ratios of car dependency. That made plans by London’s Labour mayor, Sadiq Khan, to expand an ultra-low-emissions zone to encompass the district a potent issue for Conservatives, who opposed widening the zone.

While the plan aims to improve London’s poor air quality, rather than reach net-zero targets, it was vulnerable to accusations that was piling on costs to consumers — in this case drivers of older, more polluting, vehicles.

“It’s a really big impact at a time when people are concerned more generally about the cost of living,” said David Simmonds, a Conservative lawmaker in neighboring district of Ruislip, Northwood and Pinner. “In the short term, a lot of people who don’t have the money to buy an electric vehicle or a compliant vehicle are caught by this.”

The surprise Conservative victory also sent alarm bells ringing within Labour. It caused tension between Mr. Khan, who insists the expansion will go ahead, and the party’s leader, Keir Starmer, who seemed to want a delay.

“We are doing something very wrong if policies put forward by the Labour Party end up on each and every Tory leaflet,” Mr. Starmer said after the defeat. “We’ve got to face up to that and learn the lessons.”

Even before the by-election, Labour had backtracked on its plan to invest billions a year on green industries. It blamed rising borrowing costs, which spiked during the ill-fated premiership last year of Liz Truss. Now, instead of rolling out spending in the first year of a Labour government, the party said it would phase it in.

Labour’s fear was that voters would conclude the incoming government would have to raise taxes, which would give the Tories another opening. “Economic stability, financial stability, always has to come first, and it will do with Labour,” Rachel Reeves, who leads economic policy for the Labour Party, told the BBC.

Such language is worlds away from a year ago, when Ed Miliband, who speaks for Labour on climate issues, told Climate Forward, a New York Times conference in London, that “the imprudent, reckless thing to do is not to make the investment.”

He did, however, also argue that consumers should not carry all the burden of the transition. “The government has to collectivize some of those costs to make this transition fair,” said Mr. Miliband, a former party leader.

Climate activists said Labour had made a mistake by highlighting the costs of its plan at a time of tight public finances. But given the broad public support for climate action, particularly among the young, some argue that a debate over which climate policies are the best need not end in failure for Labour.

“Voters want something done,” Mr. Burke said. “They don’t want to pay the price for it but equally, they don’t want the government to say they are not doing anything about climate change.”

For all the new skepticism, climate policy is also deeply embedded in the Conservative Party. Mrs. Thatcher was one of the first world leaders to talk about the threat to the planet from greenhouse gases in 1989. A former prime minister, Theresa May, passed the net-zero pledge in 2019, and Mr. Johnson, as mayor of London, conceived the low-emission zone that boomeranged against Labour in Uxbridge, which Mr. Johnson had represented in Parliament, last week.

Alice Bell, the head of climate policy at the Wellcome Trust, noted that some Tory lawmakers were rebelling against Mr. Sunak because they were worried about losing their seats by appearing to be against firm action on climate change.

Extreme weather, she said, would continue to drive public opinion on climate change. While Britain’s summer has been cool, thousands of Britons have been vacationing in the scorching heat of Italy and Spain, to say nothing of those evacuated from the Greek island of Rhodes in the face of deadly wildfires.

“I’m wondering if we’re going to have some people coming back from holiday as climate activists,” Ms. Bell said.