The Liberal Democrats have won the Tiverton and Honiton by-election, overturning a Conservative majority of more than 24,000.
Richard Foord won the Devon seat with more than 22,000 votes after the constituency saw a swing of almost 30%.
The former Army major said it sent a "loud and clear message".
The by-election was triggered when former Conservative MP Neil Parish resigned after admitting watching pornography in Parliament.
Mr Foord said the result was an "extraordinary and historic result which has sent a shockwave through British politics".
"Tonight the people of Britain have spoken," he said.
"They've sent a loud and clear message: it's time for Boris Johnson to go, and go now."
Mr Foord also promised to "work tirelessly" for his new constituents, saying: "Whether you supported me or someone else, I want to let you know I'm here to represent you and stand up for everyone in Tiverton and Honiton."
Analysis: Martyn Oates, political editor, BBC South West
The overnight annihilation of all the Liberal Democrat MPs in the South West in the 2015 general election was widely credited with winning David Cameron his slim majority and overturned a decades-long status quo in which the Lib Dems were the Conservatives' equals and feared opponents.
The 2017 and 2019 elections saw a further downward spiral for the party which had held every seat in Cornwall just 10 years previously.
The once victorious Lib Dems were reduced to miserable third places and Conservative majorities grew and grew.
Then, in the 2019 local elections, the party enjoyed notable successes in Devon and Somerset.
This year they wrested Somerset County Council - soon to become a unitary - from the Conservatives.
Now comes this remarkable victory in Tiverton and Honiton.
If they can do that here - in a seat they'd never previously held - the Conservatives are bound to be wondering what they might capable of in seats like North Devon, St Ives and Yeovil which they'd held for decades until just seven years ago.
Liberal Democrat leader Sir Ed Davey said the "stunning win" should be "a wake-up call for all those Conservative MPs propping up Boris Johnson" and they "cannot afford to ignore this result".
Prime Minister Boris Johnson, speaking to broadcasters 4,000 miles away in Rwanda where he is at a Commonwealth summit, said he would take responsibility, but stressed the cost-of-living crisis was the most important thing for voters, saying it is "true that in mid-term governments post-war lose by-elections".
'Some tough results'
"It's absolutely true we've had some tough by-election results, they've been, I think, a reflection of a lot of things, but we've got to recognise voters are going through a tough time at the moment," he said at a conference centre in Kigali.
Mr Johnson continued: "I think as a government I've got to listen to what people are saying - in particular to the difficulties people are facing over the cost of living, which I think for most people is the number one issue.
"We're now facing pressures on the cost of living, we're seeing spikes in fuel prices, energy costs, food costs - that's hitting people.
"We've got to recognise there is more we've got to do and we certainly will, we will keep going addressing the concerns of people until we get through this patch."
Mr Foord won with 22,537 votes, beating his nearest rival, Conservative Helen Hurford, who polled 16,393.
The swing from the Tories to the Liberal Democrats saw Mr Foord secure a majority of 6,144.
Previous MP Neil Parish told BBC Radio Devon the result was "a shock" but "very much a sort of national vote, really".
He said: "There's a lot going on out there and I'm afraid the party paid the price for it."
'Paid the price'
The Local Democracy Reporting Service said Ms Hurford was ushered out of the counting hall once the result was declared just after 04:00 BST, failing to give a concession speech or speak to the press.
Labour candidate Liz Pole, who came third, said people had shown "that they have had enough of the Conservatives".
Mid Devon District Council said a total of 42,707 votes were cast and the turnout was 52.3% out of an electorate 81,661.
Following the double by-election defeat, Conservative Party co-chairman Oliver Dowden resigned with immediate effect on Friday morning.
In his letter to PM Boris Johnson, Mr Dowden said Tory supporters were "distressed and disappointed by recent events" and he shared their feelings. "Somebody must take responsibility," he concluded