Rishi Sunak has avoided a clean sweep of by-election defeats after holding onto Uxbridge and South Ruislip in a night of three votes.

There had been pessimism in the Conservative Party that they would lose the west London seat, alongside Selby and Ainsty in north Yorkshire and Somerton and Frome in Somerset.

But the vote in west London was dominated by the expansion of the Ultra-Low Emission Zone - ULEZ - into the area by Labour's mayor of London Sadiq Khan.

Follow by-election coverage live: Tories hang on in Uxbridge after ULEZ backlash

It means Mr Sunak avoids becoming the first prime minister since Harold Wilson in 1968 to lose three by-elections in one go.

Sir Keir Starmer will be disappointed to not have gained the west London seat. The majority before the vote was around 7,000 - and at one point in the campaign, Labour candidate Danny Beales had an eight-point lead over the Tories' Steve Tuckwell.

Mr Tuckwell walked away with a majority of 495 votes - and claimed Mr Khan had "lost Labour this election" after bagging 13,965 to Labour's 13,470.

At the other end of the country, in North Yorkshire, Labour sealed their largest ever by-election win - overturning a Conservative lead of roughly 20,000 - by taking 16,456 compared to 12,295.

The party threw a substantial amount of resources at the Selby and Ainsty seat, which was not on their target list before the snap vote was called when former MP Nigel Adams stepped aside.

But Conservative voters appeared to stay at home - they were down by almost 22,000 votes compared to 2019 - letting Labour take home the seat with a swing of 23.7 points.

There was further grim reading for the Tories in Somerset's Somerton and Frome as the Liberal Democrats overturned a majority of 19,213, reclaiming a seat they had held until 2015. Now the Tories trail by 11,008 behind the Liberal Democrats' 21,187 votes with 10,179.

Read more:

Labour secure record win in Selby and Ainsty

Lib Dems win Somerton and Frome

Conservatives hold Uxbridge and South Ruislip

Early on in the night, the Conservatives were playing down the likelihood they would hold any of the three seats.

The Lib Dems were so confident in their lead in Somerton and Frome, they declared their victory before all the ballot boxes had even been opened to start counting.

The Conservatives' expectation management appears to have worked for them - and they can now claim the election win in Boris Johnson's old seat as a victory, a rare win for a government in a by-election, and a condemnation of Sir Keir as a leader.

Labour are now claiming the ULEZ issue that dominated Uxbridge and South Ruislip does not represent the feeling across the UK.

A Labour spokesman said: "This was always going to be a difficult battle in a seat that has never had a Labour MP, and we didn't even win in 1997.

"We know that the Conservatives crashing the economy has hit working people hard, so it's unsurprising that the ULEZ expansion was a concern for voters here in a by-election."

The by-elections came about after Mr Johnson, Mr Adam and David Warburton stood aside from their seats amid scandal and shunned honours.