Good nightpublished at 04:00 British Summer Time 2 August 2019
There'll be more reaction and analysis on BBC services from 6am.
In the meantime, we'll leave you with this summary of what happened:
Liberal Democrat Jane Dodds wins by-election
She says her constituents have 'chosen hope over fear'
Result means UK government's working majority is cut to one
David Deans, Andy Roberts and Ruth Thomas
There'll be more reaction and analysis on BBC services from 6am.
In the meantime, we'll leave you with this summary of what happened:
New MP Jane Dodds said her constituents had chosen hope over fear.
The Brexit Party candidate Des Parkinson, who finished third, said: "If you look at the actual total of the vote, the Brexiteers won.
"It shows where the votes are but the prime minister has to deliver a clear Brexit... if he doesn't, then his government is in dire trouble."
A Welsh Labour spokesperson says: “We always knew this was going to be a difficult night for us, but we’re proud of our positive campaign in Brecon and Radnorshire.
“One thing is clear – voters have rejected Boris Johnson and his divisive, out-of-touch UK Tory Government. We’ll continue to hold them to account..."
Plaid Cymru leader Adam Price - whose party did not stand in the Brecon and Radnorshire by-election - welcomed the Lib Dem victory.
“The single most important thing in this by-election was to put party politics aside, and deliver a pro-Remain MP for Brecon and Radnorshire..." he said, adding that another referendum should be held on Brexit.
“But if the prime minister is intent on a general election, he should know that Plaid Cymru and the other pro-Remain parties are committed to cooperating so that we beat Brexit once and for all.”
Conservative candidate Chris Davies had been the constituency MP since 2015, but lost the seat following a recall petition after he was convicted for a false expenses claim.
He congratulated Ms Dodds on her victory and wished her well for the future.
Mr Davies paid tribute to his family, saying they had had “a difficult time over the past few months.”
Jane Dodds, Liberal Democrat winner of the Brecon and Radnorshire by-election, said: "My very first act as your new MP when I get to Westminster will be to find Mr Boris Johnson... and tell him to stop playing with the future of our community and rule out a no-deal Brexit."
Liberal Democrat Jane Dodds' victory means that the Conservative government at Westminster now has a working majority of one.
Here are the numbers:
Jane Dodds - Lib Dem - 13,826 (43.5%)
Chris Davies - Con - 12,401 (39%)
Des Parkinson - Brexit - 3,331 (10.5%)
Tom Davies - Labour - 1,680 (5.3%)
Lady Lily The Pink - Loony - 334 (1%)
Liz Phillips - UKIP - 242 (0.8%)
-------------------------------------
Lib Dem Majority - 1,425
Official: The Liberal Democrats have won the Brecon and Radnorshire by-election, taking the seat from the Conservatives.
Jane Dodds has arrived at the Brecon and Radnorshire by-election count in Llanelwedd ahead of the declaration of the result.
Mark Hutchings
BBC Wales parliamentary correspondent
And then there was one. That could be the dawn chorus ringing out the over the hills of Brecon and Radnorshire all the way to Westminster this morning.
If the Liberal Democrats seize the seat from the Conservatives, then the UK government’s “working majority“ will be reduced to the most single of single figures.
For a government to have a simple majority, it must have more seats than the rest combined. But when Theresa May did the sums after her ill-fated calling of the 2017 general election, she fell short.
So she courted the support of Northern Ireland’s Democratic Unionist Party, giving her a working majority of 13. Slowly but surely that’s been whittled down.
A week after moving in to Downing Street there could be a rude awakening for Boris Johnson this morning to the harsh realities of Parliamentary maths.
At least he doesn’t have to try to steer some highly contentious issues through the Commons over the autumn months. Oh, wait…
Chris Davies, the MP whose recall led to the by-election, has arrived at the count in readiness for the result.
Cadan ap Tomos, chair of the Welsh Liberal Democrats' national executive committee, says it's been a tight race with the Tories.
Allow Twitter content?
This article contains content provided by Twitter. We ask for your permission before anything is loaded, as they may be using cookies and other technologies. You may want to read Twitter’s cookie policy, external and privacy policy, external before accepting. To view this content choose ‘accept and continue’.
Gareth Pennant is of our reporters at the count - A Welsh Tory source has told him that they think 'the Lib Dems have done it'.
One big story tonight is what may happen to the Labour vote.
Caerphilly MP Wayne David said many Labour voters were voting tactically against Tory candidate Chris Davies, and to send a "clear message" to new PM Boris Johnson.
"I believe it has happened across the board but particularly in areas where the Labour vote is concentrated," he said.
Tactical voting had happened on a "significant scale", Mr David added, saying Labour losing its deposit was a "possibility".
Ystradgynlais, a former mining community in the south of the constituency - and its largest town - has generally been considered a Labour stronghold.
But sources from three of the parties at the count tonight have suggested to our reporting team that the party's support could have collapsed there.
Some of the images so far
A Lib Dem source is more confident about the party's chances now than at the start of the night.
"It's still close", he says.
"It's interesting quite how much the Labour vote has dropped. A lot of that is going to benefit us."
Rather than a tactical move, though, the source described the switch as a "genuine change of heart".
Labour candidate Tom Davies says a lot of different factors played out in the by-election, including Brexit, and austerity.
“We know certainly from speaking to a lot of Labour voters, that some Labour voters feel that from looking at the previous history of the constituency and looking at the polling data from what we had beforehand that it’s safer to vote the Lib Dems so that Chris Davies doesn’t get back in”.
He didn't expect Labour would lose its deposit.