Former Coronation Street star Tracy Brabin has held Jo Cox MP's seat for Labour in the Batley and Spen by-election.

Ms Brabin took 86 per cent of the vote in the by-election, with the nine independent and fringe candidates who stood against her all losing their deposits.

The by-election was triggered after Ms Cox was killed outside her constituency office days just before the EU referendum.

Read more: Scotland will be 'half way out of EU' before a vote on independence

The other main parties did not stand for the seat as a mark of respect.

The turnout of less than 26% was among the lowest in a by-election since the Second World War.

In her acceptance speech, Ms Brabin - who faced a challenge from hard right candidates from both the National Front and the BNP - said her win was a victory for "hope and unity".

"This has been a difficult experience for all of us and tonight is a bittersweet occasion for me. That this by-election has had to take place at all is a tragedy," she said, amid noisy heckling from supporters from some of the rival candidates.

"I hope Jo will be proud tonight of our community. We have shown that we stand together with one voice choosing unity and hope."

Read more: Scotland will be 'half way out of EU' before a vote on independence

Meanwhile, the Conservatives survived a strong challenge from the Liberal Democrats to hang on to David Cameron's old parliamentary seat, despite seeing their majority slashed in the Witney by-election.

Barrister Robert Courts secured the victory over Lib Dem Liz Leffman but saw Mr Cameron's majority cut from more than 25,000 at last year's general election to just 5,702.

The biggest gainers on the night were the Lib Dems who saw a 19.3% swing from the Conservatives in Witney - a seat where they finished a distant fourth last year - overtaking Labour which fell back to third.

A jubilant Lib Dem leader Tim Farron said the result was a rejection of the Tories' plans for a "hard Brexit" while marking a return to the "political big time" for his party after their disastrous general election performance.

"The result not only signals that the Liberal Democrats are back in the political big time and the return to three-party politics, it is a clear rejection of the Conservative Brexit government's plan to take Britain out of the single market. This was the tenth safest Tory seat in the country with a massive 25,000 majority, yet the Conservatives were seriously rattled," he said.

"They are riding high in the polls, but my sense is that has largely been because people did not feel there was a real opposition to the Conservative Brexit government. Witney proves there is now a real opposition, and that opposition is the Liberal Democrats."

Read more: Scotland will be 'half way out of EU' before a vote on independence

In his acceptance speech, Mr Courts paid tribute to Mr Cameron - whose decision to quit Parliament triggered the contest - as "a great prime minister and a brilliant MP" for the Oxfordshire constituency.

"It did not matter who you were, where you lived or how you voted, if you had a local issue then he was always happy to help and represent local people - that is something I will strive to do and to continue in my time as Member of Parliament," he said.

"Now we are going to move forward to build a country that works for everyone, our society should work for everyone, our economy should work for everyone and our democracy should work for everyone."

The Conservatives took 17,313 votes just over 45% of the vote share - down from Mr Cameron's 60% in 2015 - while the Lib Dems with 11,611 received 30% of the vote, up from 6.8% last year.

Labour, with 5,765 votes, gained just under 15% - down slightly from the 17% it had at the general election. All the other candidates lost their deposits.

The result will nevertheless alarm those Labour MPs who believe the party cannot win under Jeremy Corbyn, despite his crushing victory in last month's leadership contest.