Nigel Farage’s Brexit Party has failed to secure its first parliamentary seat as Labour snatched victory in the Peterborough by-election.

Unite activist Lisa Forbes was elected with a majority of 683 in the marginal seat vacated by disgraced MP Fiona Onasanya, who was sacked by her constituents for lying over a speeding offence.

Labour’s victory comes as a blow to Mr Farage’s ambitions, as his recently-formed party sought to build on its strong European election performance to win a foothold in parliament.

The constituency, which voted overwhelmingly for Brexit in 2016, had been squarely in the party’s sights but appears to have been defeated by Labour’s more established ground campaign.

It was also a tough night for the Conservatives who slumped to third place, in a blow to Theresa May on her final day as Tory leader.

Peterborough by-election: Brexit Party loses out to Labour Show all 14 1 /14 Peterborough by-election: Brexit Party loses out to Labour Peterborough by-election: Brexit Party loses out to Labour Peterborough By Election Independent candidate Bobby Elmo Smith watches the by-election count on June 07, 2019 in Peterborough, England. Brexit Party candidate Mike Greene is looking to become the Brexit Partys first MP to Westminster in the Peterborough by-election, which was triggered following the removal of former Labour MP Fiona Onasanya by a recall petition. Getty Peterborough by-election: Brexit Party loses out to Labour Peterborough By Election 2 Brexit Party leader Nigel Farage in Newborough in Peterborough prior to votes being counted in the Peterborough by-election. PA Peterborough by-election: Brexit Party loses out to Labour Peterborough By Election 3 Lisa Forbes of the Labour Party accepts her win for the local seat after all votes are in and counted at the Kingsgate Conference Centre in Peterborough. AFP/Getty Images Peterborough by-election: Brexit Party loses out to Labour Peterborough By Election 4 Votes are counted at the Kingsgate Conference Centre in Peterborough, England on June 6, 2019. - A local by-election was triggered when Peterborough's former MP Fiona Onasanya was sacked by her constituents in the first successful re-call petition prompting a by-election AFP/Getty Images Peterborough by-election: Brexit Party loses out to Labour Peterborough By Election 5 Votes are counted at the Kingsgate Conference Centre in Peterborough, England on June 6, 2019. - A local by-election was triggered when Peterborough's former MP Fiona Onasanya was sacked by her constituents in the first successful re-call petition prompting a by-election. AFP/Getty Images Peterborough by-election: Brexit Party loses out to Labour Peterborough By Election 6 Votes are counted at the Kingsgate Conference Centre in Peterborough, England on June 6, 2019. - A local by-election was triggered when Peterborough's former MP Fiona Onasanya was sacked by her constituents in the first successful re-call petition prompting a by-election. AFP/Getty Images Peterborough by-election: Brexit Party loses out to Labour Peterborough By Election 7 Lisa Forbes of the Labour Party accepts her win for the local seat after all votes are in and counted at the Kingsgate Conference Centre in Peterborough. AFP/Getty Images Peterborough by-election: Brexit Party loses out to Labour Peterborough By Election 8 Lisa Forbes of the Labour Party accepts her win for the local seat after all votes are in and counted at the Kingsgate Conference Centre in Peterborough. AFP/Getty Images Peterborough by-election: Brexit Party loses out to Labour Peterborough By Election 9 Labour Party faithful cheer as Lisa Forbes accepts her win for the local seat after all votes are in and counted at the Kingsgate Conference Centre in Peterborough. AFP/Getty Images Peterborough by-election: Brexit Party loses out to Labour Peterborough By Election 10 Labour Party faithful cheer as Lisa Forbes accepts her win for the local seat after all votes are in and counted at the Kingsgate Conference Centre in Peterborough. AFP/Getty Images Peterborough by-election: Brexit Party loses out to Labour Peterborough By Election 11 Alan "Howling Laud" Hope of the Official Monster Raving Loony Party (L) and party faithful arrive at the Kingsgate Conference Centre in Peterborough. AFP/Getty Images Peterborough by-election: Brexit Party loses out to Labour Peterborough By Election 12 Alan "Howling Laud" Hope of the Official Monster Raving Loony Party (C) and party faithful arrive at the Kingsgate Conference Centre in Peterborough. AFP/Getty Images Peterborough by-election: Brexit Party loses out to Labour Peterborough By Election 13 Mike Greene (C) of the Brexit Party confers with party members at the Kingsgate Conference Centre in Peterborough, England on June 6, 2019. - A local by-election was triggered when Peterborough's former MP Fiona Onasanya was sacked by her constituents in the first successful re-call petition prompting a by-election. AFP/Getty Images Peterborough by-election: Brexit Party loses out to Labour Peterborough By Election 14 By-election votes are counted at the KingsGate Centre in Peterborough. REUTERS

Lisa Forbes won the seat with 10,484 votes to the Brexit Party’s 9,801, with the Tories in third on 7,243 votes, in a seat which has traditionally been a Conservative-Labour marginal.

In her victory address, Ms Forbes said it was clear that the “politics of hope can win regardless of the odds”.

“Despite the differing opinions across our city, the fact that the Brexit Party have been rejected here in Peterborough shows that the politics of division will not win,’’ she said.

Ms Forbes had faced controversy days before the poll when she had to apologise for endorsing an antisemitic Facebook post that claimed Theresa May had a “Zionist Slave Masters agenda”.

The then-candidate said it included a video of children praying following the Christchurch attacks.

Labour’s vote share had nonetheless fallen by more than 17 percentage points from the 2017 general election, while that of the Conservatives was down by more than 25 percentage points.

Brexit Party candidate Mike Greene, a businessman best known for appearing on Channel 4’s Secret Millionaire, had been the bookies’ favourites to win the seat

Apparently aware of impending defeat, Mr Farage left the count before the result was announced.

A Brexit Party spokesman hailed it as a “remarkable result”, adding: “If we can come so close in our 201st target seat, no seat is safe.

“We’re very proud of Mike Greene and our supporters who worked so hard. Thanks to the people of Peterborough who voted for us – we promise you that we’re here to stay!”

Labour leader Jeremy Corbyn hailed the result as a sign that his party was trusted by voters despite the criticism it has failed to take a clear line on Brexit.

Congratulating his candidate ”on a great win and a people powered campaign”, he said that voters had “shown clear support for Labour’s programme to end austerity and invest in services and communities, rejecting a decade of Tory cuts and their disastrous handling of Brexit.

“In this key seat, the Conservatives have been pushed to the margins.”

He added: “This result shows that in spite of the divisions and deadlock over Brexit, when it comes to a vote on the issues that directly affect people’s lives, Labour’s case for real change has strong support across the country.”

Labour Party chairman Ian Lavery said he was “chuffed to bits” with the result.

He tweeted: “Congratulations to the fabulous LisaForbes – Great team effort UKLabour members supporters & officials. Increased majority despite being written off by the many not the few. Chuffed to bits. Simple.”

The by-election was called after Peterborough’s previous MP Fiona Onasanya was forced out after she was jailed for lying about a speeding offence.

Onasanya was elected as a Labour MP in 2017 with a wafer thin majority of 607 but she was kicked out of the party after she was sentenced.

Local Tory activists expressed frustration that they were unable to take advantage of Labour’s difficulties due to ongoing Brexit chaos.

Support free-thinking journalism and attend Independent events

Wayne Fitzgerald, chairman of the Peterborough Conservative Association, said it was now essential the party committed to taking Britain out of the EU, even if it meant no deal.

“Parliamentarians in Westminster are against the will of the people,” he told Sky News.

“The Conservatives must de-select every MP who will not accept a WTO (World Trade Organisation) Brexit if it comes to that.