Contentious plans by London's mayor to extend a scheme taxing the use of the most polluting vehicles were being blamed Friday for costing his opposition Labour party Boris Johnson's old parliamentary seat.

Sadiq Khan intends to expand the Ultra-Low Emission Zone (ULEZ) to the whole of the British capital on August 29 -- barring a last-ditch High Court bid to stop it.

The enlarged scheme -- first introduced in inner London in 2019 and separate from its two-decades-old congestion charge -- will require more polluting vehicles to pay a £12.50 ($16) toll on days they are driven on city roads.

Amid the worst cost-of-living crisis in a generation, that has provoked fury in outer London -- where on Thursday a by-election was held in former prime minister Johnson's Uxbridge and South Ruislip seat.

Labour had been expected to take the constituency as dissatisfaction grows with the ruling Conservatives' handling of the economy and the legacy of Johnson's tenure continues to weigh on the party.

But Steve Tuckwell, the Tory candidate there, spearheaded his campaign around the ULEZ expansion, tapping into local opposition to pull off a surprise victory.

"Sadiq Khan has lost Labour this election and we know it was his damaging and costly ULEZ policy that lost them this election," he told supporters after clinching the seat by less than 500 votes.

The feat could have big ramifications within British politics and for the fate of environmental policies, as net zero and clean air targets collide with the more short-term priorities of increasingly cash-strapped voters.

"In the long term, it's very disturbing," political commentator Ian Dunt tweeted in his analysis of the result.

"It demonstrates the kind of opposition which can be rallied to environmental policies and how easily the Conservatives could be seduced into leading it."

He pointed to protests in France by the "gilet jaunes" (yellow vests) sparked in part by higher road fuel taxes, and in the Netherlands over lower speed limits to meet emissions targets, as ominous signs for Britain.

- 'Challenge' -

Dunt worries Labour, widely expected to win a general election due next year, could become more nervous about sticking to and proposing ambitious climate change policies.

Conservative Party Chairman Greg Hands appeared ready to fuel that fear, arguing Friday that "the electorate don't like Labour being in power".

"It shows what would happen if Labour were running the whole country," he said.

Environmentalists have already been spooked by the opposition party last month scaling back a flagship pledge to invest £28 billion (£36 billion) annually in a transition to "green energy", citing the grim economic climate.

Dissecting the party's defeat Thursday in northwest London, senior Labour MP Steve Reed did little to reassure them.

"I think when the voters speak, any party that seeks to govern has to listen. So that's what Labour will be doing after this," he said.

The party's deputy leader Angela Rayner also conceded the ULEZ expansion "was a problem" on the doorstep and that it will be an issue at the next election beyond just London seats.

"(It) is an issue that's coming to towns and cities near everybody," she said.

But climate campaigners may take some consolation from Rayner hinting Labour could look to offer more financial support to cushion the cost of so-called green policies.

Khan has been criticised for not making a scheme launched alongside the ULEZ expansion paying people to scrap older, more polluting vehicles, more widely accessible and generous.

"It's a challenge of how we meet our net zero targets, how we get the jobs for the future, and how we help people to transition into, you know, more cleaner, cleaner vehicles," Rayner told Times Radio.

She added whichever party wins the next election will need to enable people "to do the right thing but doesn't penalise them and charge them when they can't afford it".

"I think that's the brutal truth of it. That it's a challenge for both of us."