ED Balls has been dubbed the “Alf Garnett of British politics” after claiming that Gordon Brown refused to take his advice about the number of migrants flooding the UK after the enlargement of the European Union in 2004.

Immigration has been identified as one of the main reasons why Labour lost so many working class voters at last month’s election.

The party totally miscalculated the anger among ordinary folk who saw their jobs being taken by Poles and Bulgarians and that houses were being allocated to migrants ahead of British-born families.

Balls was called Alf Garnett - the East End lout who hated immigrants in the TV sitcom Till Death Us Do Part - by Prime Minister David Cameron on Wednesday after the would-be Labour leader turned on his mentor Brown’s stand on immigration.

Balls had said in a television interview: “I said to him (Brown) that you should be talking about immigration the last year and a half and that we were making a mistake by brushing it under the carpet.

“And to be honest, I think Gordon’s answer to Gillian Duffy” - the Rochdale pensioner Brown described as a bigot during the ill-fated election campaign - “showed he’d not been having the conversation, because what she said was the kind of things being said by Labour supporters, and in some cases former Labour supporters over the last year and a half which was: ‘Look, we’re not racist, and we support our EU membership and we know that immigration’s important for the NHS, but look what it’s doing to my community, to my child’s job prospects, our housing queues’.”

In a newspaper interview, Balls said: “There have been real economic gains from the arrival of young, hard-working migrants from eastern Europe over the past six years. But there has also been a direct impact on the wages, terms and conditions of too many people – in communities ill-prepared to deal with the reality of globalisation, including the one I represent.

“The result was, as many of us found in the election, our arguments on immigration were not good enough.

“I have no doubt that immigration has been a powerful driver of both economic growth and cultural diversity in our country.”

Balls is lagging behind the Miliband brothers in the race to become Labour leader, but because of the party’s complex electoral system, he could reach the top through second preference votes.

If he does, the five years up to the next election will become a lot more fun.