Sarah Olney, who only entered politics 18 months ago and stood for the centrist Liberal Democrat party, defeated the sitting MP Zac Goldsmith, a supporter of Britain's departure from the European Union.
In July's referendum, residents of the wealthy west London seat of Richmond Park and North Kingston voted by around two to one in favor of remaining in the EU. Olney exploited this gap to claim victory in Thursday's byelection, which was triggered by Goldsmith's resignation as a Conservative MP over his party's decision to back plans for the expansion of nearby Heathrow Airport.
She becomes her party's ninth MP, and further reduces the slender majority of the governing Conservative party.
Olney said voters had "sent a shockwave through this Conservative, Brexit government," as it prepares to take Britain out of Europe following this summer's referendum
vote in favor of Brexit.
"Our message is clear. We do not want a 'hard Brexit'; we do not want to be pulled out of the single market; and we will not let intolerance, division and fear win," said Olney in her victory speech.
Former Deputy Prime Minister Nick Clegg, who quit as Lib Dem leader after his party's disastrous showing in last year's general election, said the result showed those pushing for a so-called "hard Brexit" must think again.
Conservative Prime Minister Theresa May's government has so far not confirmed whether Britain will seek to continue to have access to the EU single market under a "soft Brexit" -- accepting the EU rules on free movement of labor that such access requires -- or be out altogether, known as a "hard Brexit."
'Europe is proud'
Guy Verhofstadt, the European Parliament's lead negotiator on Brexit, tweeted his congratulations to Olney, saying "Europe is watching and we are proud."
Goldsmith represented the Richmond seat for the Conservatives since 2010 and had won again with a large majority at last year's general election. Having resigned in protest at the Heathrow decision, in line with a promise he made to voters, he stood again as an independent candidate.
Acknowledging Thursday's result, Goldsmith said the byelection "was not a political calculation, it was a promise that I made and it was a promise that I kept," the UK's Press Association news agency reported.
This was the second bruising election defeat for Goldsmith in recent months. He ran for London Mayor in May but lost to Sadiq Khan, now London's first Muslim mayor
, after a bitterly fought campaign in which race and religion proved ugly flashpoints.
In his first major foreign policy speech since becoming UK Foreign Secretary, Boris Johnson said Friday that Brexit "emphatically does not mean a Britain that turns in on herself" and draws up the drawbridge.
"We work on security with our European friends -- we are supportive of the EU project but outside the main body of the church," he said, in a speech at the Chatham House thinktank in London.
Johnson added that now is a time to build a new relationship with Europe based on friendship and free trade.