The Liberal Democrats were today accused of "re-writing history" by claiming they are the main rivals to Labour in the Hartlepool by-election.

Stephen Allison, the candidate for the UK Independence Party, claimed the Lib Dems were trying to mislead people despite a poor showing in the European elections three months ago.

But the allegation was dismissed as being "without substance or foundation" by party officials who pointed to better results in the local elections in June and a "great reception" on the doorstep for their candidate Jody Dunn for their optimism.

A spokesman said Lib Dem candidates in the Hartlepool Borough Council elections polled 14,992 votes compared to Labour's 20,116, but Mr Allison used his own figures to show UKIP achieved an average of 26 per cent oif the vote in the wards they contested.

He said: "Less than three months after coming in a dismal fourth place in the European Elections, the Lib Dems now have the brass neck to claim to be the only party who have a chance of beating Labour in Hartlepool.

"The simple fact is that it was UKIP who were in second place in the European Elections, the Tories were third and the Lib Dems came last. It is the Lib Dems who have no chance of beating Labour in Hartlepool.

"Don't forget that after the June local elections the Labour leader and the Lib Dem leader both lost their seats and the Lib Dems now make up the smallest of the three groups on Hartlepool Council.

"The electorate is used to lies and spin from Labour and it now appears that the Lib Dems are resorting to the same tactics. If this is the level to which they are sinking already then they should give up on Hartlepool. UKIP is the real challenge to Labour in Hartlepool."

The by-election, prompted by Peter Mandelson's promotion to EU Commissioner, is also being contested by Labour's Iain Wright, Respect candidate John Bloom, the Reverend Richard Rogers, of the Common Good Party, Jim Starkey, of the National Front, and Chris Herriot, of the Socialist Labour Party.

Former Conservative candidate Gus Robinson is considering standing as an independent, but the Tories have yet to select a candidate for a contest local party leaders have admitted they cannot win.

The Lib Dem spokesman said: "The Conservatives are clealy out of the race, and voters are faced witha real choice as to who is best placed to beat the Labour Party.

"No political party should take the people of Hartlepool for granted - Labour have done that for too long and it is now time for a change."

Meanwhile, Labour say their hopes of defending Mr Mandelson's 14,571 majority and hanging onto the seat have been boosted by canvassing which shows party supporters are more likely to back Mr Wright because he is local.

With almost half the constituency canvassed, a "sizeable majority" of one-time Labour voters are said to have told party workers they will vote for Mr Wright although they did not vote for Mr Mandelson.

National press reports said party insiders suggest that more than 1,000 former supporters are now prepared to return to the fold, a number which could prove crucial.

But a campaign spokesman said: "Although it is certainly the case that people are saying they will vote Labour this time when they have not in the past, the number is pretty spurious.

"It is not anything we are keeping a tally on and it appears to have been made up."

The Lib Dems, however, said if the figure was accurate and they were "crusial" voters, it showed how close the race was.

Mrs Dunn's agent Richard Pinnock said: "Labour have only confirmed what everyone knows, that Hartlepool will be a photofinish between Jody Dunn and Tony Blair's man."