media captionThe Liberal Democrats' Sarah Green won by more than 8,000 votes

The Liberal Democrats have pulled off a stunning by-election victory, overturning a 16,000 majority in a seat that has always voted Conservative.

Lib Dem leader Ed Davey said the Chesham and Amersham result "sends shockwaves through British politics".

The party's candidate Sarah Green won by 8,028 votes from the Tories, with the Green Party in third place.

Labour had one of the worst by-election results in its history, with 622 votes.

The result is a major boost for the Liberal Democrats after their disappointing performance at the 2019 general election and brings their total number of MPs at Westminster to 12.

Mr Davey said: "We were told it was impossible for any party to beat the Tories here in Buckinghamshire.

"We were told this seat was too safe and the Tories too strong. This Liberal Democrat win has proved them utterly wrong."

He said the "Blue Wall" of Conservative strongholds across the south of England was "beginning to crumble".

Local opposition to the HS2 rail line, which is being built through the constituency, and the government's planning reforms, which could see more homes being built in rural areas, were major factors in the poll.

Full by-election results 17 June 2021

  • Sarah Green (Liberal Democrat): 21,517
  • Peter Fleet (Conservative): 13,489
  • Carolyne Culver (Green Party): 1,480
  • Natasa Pantelic (Labour): 622
  • Alex Wilson (Reform UK): 414
  • Carla Gregory (Breakthrough Party): 197
  • Adrian Oliver (Freedom Alliance): 134
  • Brendan Donnelly (Rejoin EU): 101
  • Lib Dem majority: 8,028

Turnout: 52% (37,954)

Conservative candidate Peter Fleet tweeted he was "deeply disappointed" that the people of Chesham and Amersham had "under the extraordinary circumstances of a by-election, voted for someone else to represent them in Parliament".

A source at Conservative Campaign Headquarters said "by-elections are always difficult for the governing party, particularly 11 years into government".

This did not stop the Tories winning Hartlepool from Labour in May, and the source acknowledged "there is no getting away from the fact this is a very disappointing result".

The by-election was caused by the death in April of former Welsh Secretary Dame Cheryl Gillan.

In 2019, she retained the seat with more than half of the vote. But the Conservative majority has been steadily decreasing since the 2015 General Election, when it was 23,920, with UKIP coming second.

In 2017, it was 22,140 with Labour second with 11,374, and in 2019 the Liberal Democrats got the second-highest number of votes, picking up 13% more than they did in 2017.

AnalysisAndy Holmes, Political Reporter, BBC Three Counties Radio

The Lib Dems threw just about everything at this campaign, with leader Sir Ed Davey visiting the seat 15 times after the election was called, and with a leafleting campaign similar to one the party had used in St Albans, a seat they gained from the Conservatives in 2019.

Despite its huge majority in the House of Commons, the Conservatives were taking the election seriously with Prime Minister Boris Johnson paying a visit to the constituency to campaign along with visits from other big hitters such as Rishi Sunak, Oliver Dowden and Theresa May.

It was a seat that the Labour Party had no chance of winning, but 622 votes is astonishingly low, especially given that they came second in the 2017 General Election with 11,374 votes.

In the end, the Liberal Democrat strategy was a success.

The party tell me that on the doorsteps they'd spoken to many voters who had felt neglected in recent years and had also voiced their concerns over how changes to planning laws would have an impact on the Chilterns Area of Outstanding Natural Beauty.

Now she's been elected, Sarah Green will have the opportunity to raise those concerns where she can make a difference – in Westminster.

The Lib Dems have enjoyed a great year in Buckinghamshire, taking the town council in Amersham, and gaining ground and councillors in the first elections for the new Buckinghamshire Council in May.

But this result tonight is one that perhaps took even their most optimistic supporters by surprise.

Find BBC News: East of England on Facebook, Instagram and Twitter. If you have a story suggestion email [email protected]