Tony Blair has warned Ed Miliband not to lurch to the right on immigration in an unwise attempt to head off a "nasty and unpleasant" threat from Ukip.
The former prime minister said it would be a "massive mistake" to allow Ukip to force Labour into an anti-immigrant direction and urged Miliband to "stand up and take them on".
"If Labour was to go down and ape Ukip it would be a massive mistake and it wouldn't bring us many votes in my view," he told BBC News this morning.
He urged Miliband to take on Nigel Farage's arguments instead.
"I would advise [Miliband] to stay firm," he told the Today programme.
"It's not as if yielding to that pressure from Ukip has done the Conservatives any good. And for the Labour party if it tries to follow Ukip either on its anti-European platform or even worse frankly its anti-immigration platform, then all that will happen is it will confuse its own supporters and it won't draw any greater support.
"The way to deal with Ukip is to stand up and take them on."
Blair's comments follow recent attempts by Miliband to shift the party's stance on immigration in an attempt to deal with the threat from Ukip.
Labour MPs have urged the leadership to take a harder line on immigration, following discontent from many former voters on the doorstep.
The strong performance by Ukip in Labour seats at the local elections has also rattled the party.
Over the weekend, one of Miliband's key lieutenants made a public apology for its record on immigration.
"In the past, we were too quick to dismiss concerns about immigration, or even worse - accused people of prejudice," shadow justice secretary Sadiq Khan wrote in the Sunday Express.
"We all remember Gillian Duffy. We were wrong. We are sorry."
Khan claimed that "in too many places immigration has driven down local wages" and suggested that forcing immigrants to learn the English language "will be a priority".
In an apparent broadside against Khan, Blair warned that it was a mistake to blame the country's problems on immigration.
"The idea the problems of Britain are about immigrants is a backward and regressive step and we should contend every inch of that argument," he said.
Blair defended his own record on immigration and suggested that Labour should show leadership on the issue.
"Remember I fought the 2005 on a campaign against immigration from the then Conservative leader.
"I have always said of course you have always got to have proper controls... However to allow that to trend into anti-immigrant feeling is in my view a huge mistake for the country."