Votes are being counted in the Batley and Spen by-election, with pollsters and bookmakers predicting a Tory victory - a result likely to trigger moves to oust Sir Keir Starmer as Labour leader.
Tory challenger Ryan Stephenson is being tipped to defeat Labour's Kim Leadbeater, sister of the murdered former MP Jo Cox, after one of the most bitterly-fought parliamentary by-election campaigns in living memory.
Throughout the ill-tempered campaign, rival parties have accused their opponents and their supporters of dirty tricks, intimidation including assaults, fake leaflets, dog-whistle racism and homophobia, prompting calls for police and election officials to intervene.
Although the Conservatives are strong favourites to win the by-election, Labour mounted a massive push for votes in the final hours before the polls closed in the hope of pulling off a remarkable victory against the odds.
Ms Leadbeater is defending a majority of just 3,525 won at the December 2019 general election by former Coronation Street actress Tracy Brabin, who triggered the by-election with her election to the new post of West Yorkshire metro-mayor.
In a message on Twitter after polls closed, she said whoever wins must "bring our community together".
"There have been many highs of this election campaign but sadly there have also been some unacceptable lows," she said.
"The acts of intimidation and violence by some who have come here with the sole aim of sowing division has been deeply upsetting to witness.
"Whatever the result tonight, the first priorities of the new MP must be to bring our community together and start working for local people in every part of the constituency I am proud to call my home."
Labour are in danger of a second humiliating by-election defeat by the Conservatives inside two months, largely due to the aggressive campaign of the maverick left-winger George Galloway, who was once a Labour MP, to "topple" Sir Keir.
The controversial Mr Galloway won a sensational by-election victory in nearby Bradford West in 2012 with a campaign wooing ethnic minority voters - and although a repeat of that success in Batley and Spen would be a major shock, he has employed the same strategy this time.
Campaigning in a vintage open-top bus in his trademark fedora hat, Mr Galloway has sought to persuade Muslim voters to desert the Labour Party and vote for him by exploiting the Israel-Palestine conflict and condemning Sir Keir as pro-Israel.
Mr Galloway thanked voters and said "whatever the outcome" the people in the constituency "will be forgotten no longer".
He added: "One thing is certain: it's curtains for Keir."
Mr Stephenson said: "Thank you to everyone who voted for me and supported me.
"Whatever the result, you proved that more and more local people are ready for change."
Another boost for the Conservatives has been that a pro-Brexit former Rugby League player, Paul Halloran, who polled nearly 6,500 votes in the 2019 general election, and a Brexit Party candidate who polled nearly 1,700 votes, are not standing.
Amid predictions of a defeat for Labour, just weeks after the party's disastrous loss of the Hartlepool by-election in May, if Labour have lost then Sir Keir's left-wing critics are poised to demand his resignation or force a leadership challenge as soon as the Batley result is declared.
Unlike Hartlepool, Batley and Spen is not a true "Red Wall" seat which had always been a Labour stronghold. It was held by the Conservatives from 1983 until Tony Blair's landslide in 1997.
But this week, amid reports that Labour deputy leader Angela Rayner is being urged to mount a leadership challenge, Sir Keir's spokesman was forced to insist he would not resign even if the party loses the by-election.
Even before the campaign got under way, supporters of Jeremy Corbyn went on the attack.
Left-wing MP Diane Abbott said it would be "curtains" for Sir Keir if Labour lost and soon-to-retire Unite general secretary Len McCluskey said he would be consigned to "the dustbin of history".
Many mainstream Labour MPs were also furious with Sir Keir and his inner circle for causing what they regarded as an unnecessary by-election by allowing Ms Brabin to stand for mayor, since the job includes being police and crime commissioner, which disqualified her from remaining as an MP.
The embattled leader's "I won't quit" defiance came after a Sky News-YouGov poll suggested 41% of Labour members want Sir Keir to stand down if Labour loses and 48% believe he should stay.
The same poll suggested 69% of Labour Party members believe Andy Burnham, mayor of Greater Manchester, would make the best Labour leader.
Right on cue, Mr Burnham - who unsuccessfully stood for the Labour leadership in 2010 and 2015 - signalled in an interview in the Labour-supporting New Statesman magazine that he would be prepared to stand for leader again, although not yet.
"I ain't going back any time soon," he said when asked about a return to Westminster.
"I'm supporting Keir. I want him to win the next general election and I will do whatever I can to help him achieve that."
But Mr Burnham added: "If there was a moment where that was right, then I've indicated that I would be prepared to go back. But I wouldn't put the old suit on - it would be to go back as something different."