Boris Johnson's Conservatives may have been defeated in their first electoral test in the Welsh farming seat of Brecon and Radnorshire, but the relatively narrow 1,425-vote loss to the Liberal Democrats can still give the new prime minister hope if his administration can leave the European Union by 31 October.
Appearing alongside her new MP, Ms Swinson said: "This by-election victory shows that the people of Brecon and Radnorshire not only have a first-class MP in Jane Dodds but they have shown the people of Britain that we can do better than the choice on offer between Boris Johnson and Jeremy Corbyn".
Al Jazeera's Rory Challands reports from London.
Guy Verhofstadt, a Belgian politician and a leader on Brexit in the European Parliament, tweeted his congratulations to the Liberal Democrats, asserting "the party goes from strength to strength & it really could change everything". Labour came in fourth with just over five per cent, narrowly avoiding losing its deposit.
The election was viewed as a test of strength for the "Boris bounce" that has helped the Conservatives regain a slim lead in some national opinion polls.
A spokesman for Welsh Labour said: "We always knew this was going to be a hard night for us, but we're proud of our positive campaign in Brecon and Radnorshire". Some members of Parliament oppose leaving the European Union altogether.
But the controversies surrounding Davies turned this into an unusual contest whose outcome might not reflect either Johnson's or Brexit's true level of wider support.
MPs are already plotting ways to thwart his threat to take Britain out by the twice-delayed deadline without a divorce deal.
"The Tories won't win there ever and clearly if the Tories split our vote we won't win", Farage explained.
This leaves Johnson dependent on the whims of just a few legislators at one of the most crucial points in British history since World War II.
The Bank of England warned Thursday that a messy split would drop the pound even further and slow growth this year and next to 1.3% from around 1.5%. The deep divisions that exist on Brexit were laid bare in the byelection, which saw the Green Party and local Plaid Cymru backing the Liberal Demcocrats in an alliance by not fielding rival candidates in order to consolidate the anti-Brexit alliance.
It is true that, when Theresa May brought her withdrawal treaty before the House of Commons for a third time, complete with the contentious backstop, Johnson voted for it, and as Prime Minister he has put Michael Gove and Stephen Barclay, who both backed Mrs May's deal from the beginning and all the way to the end, in charge of no-deal planning - while senior Brexiteers like Steve Baker consistently supported no-deal have been left languishing on the backbenches. Northern Ireland's fractious parties then told him that his Brexit plans were reopening old wounds. Johnson won the Tory leadership contest with the pledge of taking the United Kingdom out of the 28-member economic bloc within the October 31 deadline, with or without a deal.
Welsh sheep farmers are anxious that the 27 remaining members of the European Union will throw up barriers to their lamb exports in case of a messy "no-deal" divorce.