Ken Livingstone, the former mayor of London, has launched a scathing attack on Gordon Brown and warned that Labour will lose a growing number of party supporters if he stays on as prime minister.

In a wide-ranging interview with Total Politics magazine, due to be published on Friday, Livingstone also blamed Brown's leadership for his mayoral defeat to Boris Johnson last May following a "horrendous" election campaign.

Livingstone used the interview to claim that his criticisms of Brown early in his ministerial reign had been vindicated.

"I was very critical of the first two years. The passage of time has shown me to be right," said Livingstone, who caused uproar in 1998 while still a Labour MP by calling for Brown to be sacked as chancellor.

Livingstone told Total Politics that the Labour government was failing to do something for "working-class" people at its peril and warned that the far right "do well" when a Labour government does badly.

He said: "The BNP will continue eating into the Labour vote until the government realises it needs to do something for working-class people."

Livingstone insisted that none of his major decisions in his two terms as mayor were "wrong", conceding that his only mistakes were in being "rude to journalists".

"If you could have taken away the national dimension I think I would have won [last year's mayoral election] because Boris's negatives were more than mine. We did monthly polling and from the moment Boris announced [his candidacy] my ratings went up and up.

"It was only in November they started coming down. I then realised it was just tracking the national party's polling. Immediately after the budget, Labour's figures and mine just went off a precipice. The figures slowly came back, and if we had had another two months we might have pulled it back."

He hinted that he would stand as an independent mayoral candidate again if the party indulged in "ballot rigging", which he said occurred in Labour's first mayoral selection process in 2000. Labour threw Livingstone out after he failed to win the party's nomination. He then ran against the party's chosen candidate, Frank Dobson.

Livingstone was hit by a controversial system in which votes from sitting Labour MPs and MEPs were weighted more heavily than votes from rank-and-file members.

Livingstone said: "There was a huge amount of ballot stealing going on. Piara Khabra [the former Labour MP for Ealing Southall, now deceased] was going round boasting how he had personally collected 300 ballots. They have to have one member one vote. I will be happy to submit myself to one member one vote and abide by the result. I was happy to do it last time, but they changed it."

Despite returning to the Labour fold to win a successful second term in 2004, the former mayor has made himself unpopular with a number of Labour parliamentary insiders by touting himself as the party's best choice for the 2012 election.

The pool of candidates in four years' time is expected to be crowded with potential candidates, especially if some London Labour MPs lose their parliamentary seats at the next general election.

Livingstone also used the interview to admit that he had revised his views of Johnson, which he said he had based on the "racist, reactionary, negative neocon piffle" he had written over the course of his journalistic career.

Now he realised that Johnson's weakness was his lack of "ideology", he said. "Boris doesn't believe in anything at all, except that Boris should rule the world".

Livingstone caused more controversy today when he came under fire for setting a "poor example" after escaping a £20 fine despite getting on a train at Paddington station without a ticket.

The First Great Western train company denied that the former mayor received preferential treatment. A spokeswoman said: "When he got to Slough, Mr Livingstone approached a member of our staff, apologised and offered to pay before being asked. Our approach is to give passengers the benefit of the doubt before issuing a penalty fare.

"He said he was in a massive hurry and had not obtained a ticket. We took the same approach with 10 other passengers who were on this train. There was no question of Mr Livingstone being given preferential treatment."

Norman Baker, the Liberal Democrats' transport spokesman, told the Daily Mail: "This sends out the wrong message. It's a poor example to set."