Labour is heading for an “electoral disaster” in 2020, one of the party’s MPs has warned after its poor performance in the Sleaford and North Hykeham by-election.

The party came in fourth, taking just 10.2 per cent of the vote, a fall of seven per cent since the 2015 general election, when Labour came second.

The Conservatives won with 53.5 per cent, comfortably beating Ukip in a contest that was seen as a test of Theresa May’s handling of the Brexit vote.

Veteran Labour MP David Winnick said the result was a "appalling" for the party, and said Labour’s leadership needed to shake off its “bunker mentality”.

“Even if one takes into account that the by-election turnout was considerably lower than in the general election, it was an appalling result for Labour,” the Walsall North MP told the Press Association.

“If we were to continue in this way then the indications are 2020 will be an electoral disaster and the possibility of a Labour government very remote indeed.

“The sort of bunker mentality that seems to exist at the moment at the highest levels of the party needs to recognise what is happening in the outside world.”

The Conservative candidate, Dr Caroline Johnson, said in her victory speech that she looked forward to “strengthening the Government's majority in Parliament so Theresa May, our Prime Minister, can get on with the job of triggering Article 50, leaving the European Union and building a country and economy that works for everyone.”

Ukip had hoped to capitalise on the prime minister’s reluctance to reveal the Government’s Brexit plans, but suffered a fall of 2.2 per cent in the vote since the general election.

Victoria Ayling won 13.5 per cent of the vote for the party, with leader Paul Nuttall, who was at the count, hailing a “great result” for the party – his first as leader.

Labour MP Vernon Coaker defended his party's performance, but said Labour's message was lost as Brexit became the key point of debate.

He said: “It was a difficult seat. Let's remember this is a safe Tory seat, Ukip came here expecting to do much better than they did so it's a bad result for them. But clearly for us, this was not the result we might have hoped for.

Supreme Court Brexit Challenge Show all 13 1 /13 Supreme Court Brexit Challenge Supreme Court Brexit Challenge People wait to enter the public gallery outside the Supreme Court ahead of the challenge against a court ruling that Theresa May's government requires parliamentary approval to start the process of leaving the European Union, in Parliament Square, central London Reuters Supreme Court Brexit Challenge Gina Miller, co-founder of investment fund SCM Private arrives at the Supreme court in London on the first day of a four-day hearing Getty Supreme Court Brexit Challenge A man waves the EU flag in front of the Supreme Court Getty Supreme Court Brexit Challenge Satirical artist Kaya Mar poses with two of his paintings in front of the Supreme Court Getty Supreme Court Brexit Challenge Pro-Europe protestors dressed as Supreme Court Justices stand outside the Supreme Court ahead of the first day of a hearing into whether Parliament's consent is required before the Brexit process can begin. The eleven Supreme Court Justices will hear the government's appeal, following the High Court's recent decision that only Parliament can trigger Article 50 Getty Supreme Court Brexit Challenge The eleven Supreme Court Justices will hear the government's appeal, following the High Court's recent decision that only Parliament can trigger Article 50 Getty Supreme Court Brexit Challenge Businesswoman Gina Miller arrives at the Supreme Court ahead of the first day of a hearing into whether Parliament's consent is required before the Brexit process can begin Getty Supreme Court Brexit Challenge Attorney General Jeremy Wright arrives at the Supreme Court in London EPA Supreme Court Brexit Challenge Protesters outside the Supreme Court in London, where the Government is appealing against a ruling that the Prime Minister must seek MPs' approval to trigger the process of taking Britain out of the European Union PA wire Supreme Court Brexit Challenge A protesters wearing a judge's wigs and robes stands outside the Supreme Court ahead of the challenge against a court ruling that Theresa May's government requires parliamentary approval to start the process of leaving the European Union, in Parliament Square, central London Reuters Supreme Court Brexit Challenge A protester holds up a placard outside the Supreme Court ahead of the challenge against a court ruling that Theresa May's government requires parliamentary approval to start the process of leaving the European Union, in Parliament Square, central London Reuters Supreme Court Brexit Challenge Pro-Europe protestors dressed as Supreme Court Justices stand outside the Supreme Court Getty Supreme Court Brexit Challenge A man waiting to enter the public gallery waves a European Union flag outside the Supreme Court ahead of the challenge against a court ruling that Theresa May's government requires parliamentary approval to start the process of leaving the European Union, in Parliament Square, central London Reuters

“The challenge for us was because of Brexit. Everything was about Brexit. The messages about the A&E, the NHS, the messages about infrastructure, all of that got lost to an extent in the swirl around Brexit.