STOKE-ON-TRENT, Staffordshire – A few hours before the polls closed in Stoke-on-Trent Central on Thursday night, Neil Mason and his son Tom stepped out of the Bentilee Neighbourhood Centre into the icy darkness, having just voted for UKIP.

“We need somebody on our side again, somebody working-class,” Mason, a builder, said. And Paul Nuttall, he thought, could be that politician.

It didn’t bother him that Nuttall’s campaign had been tarnished by a succession of careless blunders: registering his candidacy at a house he’d never lived in, falsely claiming on his website that close friends had died at Hillsborough, and failing, when put on the spot, to name the six towns that make up the city of Stoke-on-Trent.

That was just the rough-and-tumble of politics. Other leaders had been worse. “He’s worth a go,” Mason said.

Mason’s family had traditionally supported Labour, but he’d grown tired of the main parties in Westminster not paying attention to people struggling to make ends meet in areas like this. Immigration was his main concern: “We should be looking after our own,” instead of letting foreigners crowd already-strained public services, he said.

He wasn’t alone. Gary Parton and his wife Andrea also voted for UKIP. “Immigration only, one reason,” Gary explained brusquely when asked why. The Partons, too, had been Labour voters most of their lives, but didn’t think the party had done enough to improve living standards for local people in the decades they’d held the seat.

Across the city, more than 300 UKIP activists were trying to persuade others to venture out in the grim conditions – Stoke was, at the time, being lashed by Storm Doris – to vote for their party leader. And with voting soon to close, they were hopeful of pulling off a stunning victory that would eject Labour from a seat it has held since 1950, sending Nuttall to Westminster as UKIP’s second MP.

“Things are likely to be very, very close,” one Nuttall staffer said.

But on rival campaigns, aides told a different story.

Throughout the day, sources in the Liberal Democrats were hearing from their people on the ground that Labour would win relatively comfortably, with Nuttall a distant second. The real question, they said, was not whether Nuttall would challenge Labour for the victory, but whether he would be overtaken by the Conservatives and pushed into third place.

Their forecasts turned out to be accurate.

At just after 2am on Friday morning, officials in the community sports centre where the ballots were tallied announced that Nuttall had lost by more than 2,600 votes. Despite everything the party had thrown into the contest in the last six weeks, he managed to increase UKIP's share of the vote by only 2% from its result at the 2015 general election.