Barnsley Central was meant to be boring.
After all, any candidate wearing a Labour rosette in the town always seems bound to win. Not even the sight of the former Labour MP being sent down for fiddling his expenses seemed likely to disturb that rule.
In the event, the result proved anything but boring. True, Labour did secure its inevitable victory. By increasing its share of the vote by 13 points it more than reversed the loss of support it suffered in the constituency between 2005 and 2010. The performance confirmed the message from the Oldham East and Saddleworth by-election in January that Labour has rapidly put Gordon Brown's legacy behind it.
The big surprise was in how badly the Liberal Democrats did. The party won under 4.2 per cent of the vote, its third-worst post-war performance in an English by-election. Not since the voters of Walsall North went to the polls in 1976 has the party obtained a lower share of the vote. And whereas it suffered the indignity of coming fifth in Walsall, in Barnsley it tumbled to sixth – the first time in history that the Liberal Democrats have sunk that low in an English by-election.
One excuse the party often uses when it does poorly is that its vote was squeezed in a two-horse race. The Walsall disaster occurred in the wake of Conservative success in grabbing what had looked like a safe Labour seat. Equally, similar catastrophes in many a previous Scottish by-election have happened when the Scottish National Party was posing a challenge to Labour. But in Barnsley, Liberal Democrat voters were not squeezed – they disappeared.
The party does, though, have a new excuse – that it is having to take tough, unpopular measures in Government. But so are the Conservatives. Yet whereas the Liberal Democrat vote fell by more than 13 points, the Conservative tally dropped by just nine. As the opinion polls have long suggested, the Coalition's tough measures are apparently less acceptable to former Liberal Democrat voters than they are to Conservatives.
But the Barnsley result was surprisingly discomfiting for the Conservatives. The party could blame the near 14-point drop in its support in Oldham on many of its supporters switching to the Liberal Democrats as the party best placed to defeat Labour. That was not true in Barnsley.
Yet the Tories still lost a lot of ground. Meanwhile, Ukip recorded a 7.5-point increase in its support, sufficient for it to overtake the Tories and register its best by-election performance yet.
Barnsley could well prove a warning to the Conservatives that, with the party now in league with the Liberal Democrats, Ukip may become the protest vehicle of choice for disaffected Tories. The last thing David Cameron needs is trouble on his Eurosceptic right.
The writer is professor of politics at Strathclyde University