The once-safe Conservative seat of Chesham & Amersham has been won by the Liberal Democrats.
Sarah Green achieved a majority of more than 8,000, beating Tory candidate Peter Fleet in the election brought about by the death of Dame Cheryl Gillan in April.
The Green Party was in third place, with Labour in fourth.
Polls had been suggesting a very tight race, but the scale of the win still comes as a surprise in a constituency where HS2 and housebuilding played a part in the final outcome.
Lib Dem leader Ed Davey said the result “sent a shockwave” through British politics.
“If [the Lib Dems] can beat the Tories here, we can beat them anywhere,” he tweeted. “The blue wall can be smashed.”
Green overturned a majority of more than 16,000 to poll 21,517 votes, compared to Fleet’s 13,489, the Green Party’s 1,480 and Labour’s 622 votes.
Speaking after her victory was confirmed, Green said: “Together we have said enough is enough, we will be heard and this government will listen.
“This campaign has shown that no matter where you live, or how supposedly safe a constituency may appear to be, if you want a Liberal Democrat member of parliament, you can have a Liberal Democrat member of parliament.”
Fleet described the result as “very disappointing” and “not the result I was expecting nor my team.”
Home office minister Kit Malthouse told BBC Radio 4’s Today programme :”We will have to tease out what the issues are.”
He acknowledged that HS2 had played its part, and took a swipe at the Lib Dem strategy, saying “There is a conflict between their national message and their local message on HS2.”
The seat had been held by the Conservatives since its creation in 1974.