The Conservatives have lost the North Shropshire seat they held for nearly 200 years to the Liberal Democrats in a by-election blow to Boris Johnson.
Winner Helen Morgan overturned a Tory majority of almost 23,000, declaring that the "party is over" for the PM.
The result follows a torrid week for Mr Johnson, who has faced criticism over Downing Street parties and a rebellion by his own MPs over Covid measures.
Tory MP Sir Roger Gale said the prime minister was on "last orders".
"One more strike and he's out," he told BBC Radio 4's Today programme, adding that the by-election "has to be seen as a referendum on the prime minister's performance".
Conservative Party chairman Oliver Dowden said: "I know that the voters of North Shropshire are fed up and they wanted to give us a kicking... We've heard that message loud and clear."
But he added: "I don't think this amounts to a sea-change."
The by-election followed the resignation of Owen Paterson, the MP for North Shropshire since 1997, who was found to have breached parliamentary rules on lobbying.
In her victory speech, Ms Morgan, who won by 5,925 votes, said: "The people of North Shropshire have spoken on behalf of the British people. They have said loudly and clearly, 'Boris Johnson, the party is over.'
"Your government, run on lies and bluster, will be held accountable. It will be scrutinised, it will be challenged and it can and will be defeated."
Ms Morgan's victory takes the number of Lib Dem MPs up to 13, still significantly down from a high of more than 60 during the mid-2000s. The party lost dozens of its seats at the 2015 general election after being part of a coalition government with the Conservatives.
But, at a celebration rally in Oswestry, part of the North Shropshire constituency, former Lib Dem leader Tim Farron said millions of people around the UK "have woken up this morning feeling that a bit of light has broken into the darkness".
He also held up a large blue balloon bearing the slogan "Boris's bubble", which Ms Morgan, formerly a chartered accountant, proceeded to burst with a foot-long pin.
The government is going to try and say this is mid-term misery - and, yes, by-elections are a way the public can stick two fingers up to a government when they're cross.
But let's be plain: this is an appalling result for the Conservatives, in a part of the country where the tradition of voting Tory is baked into the earth. This isn't a little slip up; it's a disaster.
People on the ground say the Tory campaign was going OK, until all of the recent shenanigans in Downing Street emerged, and that that is when support fell off a cliff.
Boris Johnson does have an extraordinary ability to bounce back. But there are people in the Conservative Party who are pencilling in the possibility of a summer leadership election.
Things are febrile, and we shouldn't predict things with any certainty - but there's no doubt this is a really dangerous moment for the prime minister.
Fourteen candidates stood in Thursday's by-election. Ms Morgan took 17,957 votes, with Conservative Dr Neil Shastri-Hurst amassing 12,032 and Labour's Ben Wood coming third with 3,686.
The last-placed candidate, independent Yolande Kenward, received just three votes. The North Shropshire result saw a the seventh biggest swing - 34.2% - in a by-election since World War Two.
It is the second loss of a former Conservative stronghold to the Lib Dems since the general election, with the party seizing Chesham and Amersham, in Buckinghamshire, with a 25% swing in July.
Earlier this month, the Tories held Old Bexley and Sidcup in a by-election following the death of MP James Brokenshire, but the majority was cut from nearly 19,000 to 4,478, with a 10% swing to Labour.
The North Shropshire seat has existed in some form since the 1830s and, until Friday, had always had a Conservative MP.
The area voted strongly in favour of Brexit in the 2016 referendum, but this did not stop the pro-EU Lib Dems taking the constituency.
The by-election came just two days after Boris Johnson experienced his biggest rebellion in office, when 100 Conservative MPs voted against the government's proposals to introduce Covid passes in England.
It also followed rows about a Number 10 Christmas party during lockdown restrictions last December and the prime minister's appearance at a virtual quiz alongside two colleagues at about the same time.
Before that, there had also been a fine for the Conservative Party over the financing of Mr and Mrs Johnson's renovation of the No 10 flat, and the fallout over Owen Paterson's departure, with the prime minister admitting some fault over the latter.
Reacting to his party losing North Shropshire, Dr Shastri-Hurst said: "We are 11 years into Conservative government. Our elections are never an easy thing to do.
"But of course, we do need to reflect upon the result and I am sure as a party we will do that."
But Liberal Democrat leader Sir Ed Davey, who is currently self-isolating after testing positive for coronavirus, said it was a "watershed moment in our politics".
"Millions of people are fed up with Boris Johnson and his failure to provide leadership throughout the pandemic and last night the voters of North Shropshire spoke for all of them," he added.
Labour, which came second in North Shropshire at the 2019 election, saw its share of the vote fall from 22.1% to 9.7%.
Shadow business secretary Jonathan Reynolds told BBC Breakfast: "We put the effort into it that was proportionate to our chances of winning.
"But clearly people wanted to send a message to the government that they're fed up with the incompetence, the sleaze, the kind of revelations we've seen over the last few weeks.
"The government has to take heed of that."