The Liberal Democrats have pulled off a stunning by-election victory, overturning a 16,000 majority in a seat that has always voted Conservative.
Leader Sir Ed Davey celebrated by knocking over a wall of blue bricks, claiming his party was now the "main threat" to the Tories in many areas.
The party's candidate Sarah Green won by 8,028 votes from the Tories, with the Green Party in third place.
Labour had the worst by-election result in the party's history, with 622 votes.
The result is a major boost for the Liberal Democrats after their poor performance at the 2019 general election and brings their total number of MPs at Westminster to 12.
Prime Minister Boris Johnson described the result for his party as "disappointing".
Appearing alongside Ms Green at a victory rally in the Buckinghamshire constituency, Sir Ed said: "This is a great result, a huge swing to us. There are many Conservatives across the country who are now worried.
"People have been talking about a red wall, well after Chesham and Amersham and Sarah Green's victory they'll be talking about a blue wall, and how the Lib Dems are the main threat to the Conservatives.
"People here felt ignored and taken for granted, and we listened. Sarah Green is going to take these concerns to Parliament and hold this appalling Tory government to account."
In her victory speech in the early hours of Friday, Ms Green said: "Tonight the voice of Chesham and Amersham is unmistakable. Together we have said, 'enough is enough, we will be heard and this government will listen'."
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.
Mr Johnson attributed the defeat to local issues and insisted the government was focused on "uniting and levelling up within regions across the whole country".
Responding to suggestions his party's house building plans had led to defeat, he said there had been a "wilful misunderstanding about the planning reforms" adding that the government wanted to develop brownfield sites rather than "build all over the countryside".
Speaking to the BBC, Conservative candidate Peter Fleet warned against reading "too much" into his defeat arguing that the result was caused by "very local circumstances".
But Bob Seely - Conservative MP for the Isle of Wight - told the BBC the government "badly need to think again about planning".
"This entire system feeds the over-development of the south and the under-development of other areas. It needs to change."
Polling Expert Prof Sir John Curtice said "in remain-voting middle class seats in the south of England, the Conservative coalition has been weakened to some degree in the wake of Brexit - the Liberal Democrats are best placed to profit from that."
For the Liberal Democrats, this will be a legendary victory to rank alongside famous by-election upsets of the past.
We may be seeing the return of classic Lib Dem "pavement politics" - relentlessly campaigning on local issues such as HS2, which the party supports nationally, but opposed locally.
More worrying for the Conservatives, is the apparent backlash against the government's planning reforms.
But are there bigger conclusions to be drawn?
The Lib Dems claim the political geography of the UK is changing.
The party made inroads in some traditional Conservative areas - many of which had majorities for Remain in the 2016 EU referendum - in the recent local elections in England.
Some Conservative councillors worried that their party's emphasis on "levelling up" and on former Labour seats in northern England could be making some voters in the south feel left behind.
But, so far, the Conservatives have been gaining more ground in the north than they have been losing in the south.
As for Labour at Chesham and Amersham, their vote collapsed.
It's clear that there was tactical voting to oust the Conservatives.
What might be more concerning to Labour leader Sir Keir Starmer is the sheer extent of this - and that the party's vote was as solid as quicksand.
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.
Following the by-election, Ben Nunn - director of communications for Labour leader Sir Keir Starmer - stepped down from his role. He told the BBC it was a "personal decision".
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)