Labour divisions over the threat posed by Ukip have been thrown into the open after Tony Blair defended his government's record on immigration as Ed Miliband said many people rightly believed politicians had failed to understand their concerns on the issue.

The former prime minister described Ukip as "pretty nasty and unpleasant" hours before Miliband said that many people who voted for the party loved Britain and did "the right thing" in their communities.

Miliband, who said people who raised concerns about immigration were not prejudiced, delivered his conciliatory message to Ukip voters in the marginal seat of Thurrock in Essex after Nigel Farage's party captured five council seats, depriving Labour of control of the council. A continuing Ukip presence in the seat could pose a threat to Labour, which should capture the seat with a swing of just 0.1% from the Tories to Labour.

"Immigration has been changing communities fast, including here in Thurrock – a growing west African community, people coming from eastern Europe. The pace of change is quicker than it has ever been," the Labour leader said. "Over the last decades there were big changes happening in our country and fewer and fewer working people thought that anyone in politics was getting those changes, that anyone in politics could do something about them."

Miliband said Ukip's triumph in the local and European elections could be explained by Farage's success in exploiting concerns that he had highlighted since he became Labour leader. Often referred to as the "blue Labour agenda" associated with the academic peer Lord Glasman, these are a sense of dislocation in a rapidly changing world and the struggle to make ends meet after such a deep recession.

The Labour leader said: "Some of the people who voted for Ukip came from that part of working Britain who do the right thing, who work hard for a living and are really, really struggling to make ends meet. They are in tough jobs but life is a real struggle for them.

"They are people who love our country but they are people who are saying the country is not working for me. They feel left behind by what has happened to Britain – some people who in years gone by would have been Labour till they die, some people whose parents have always been Labour, whose grandparents have always been Labour."

The remarks by Miliband contrasted with Blair's defence of his approach on immigration.

The former prime minister told the Today programme on BBC Radio 4: "I would very strongly support the position we took both on immigration and Europe. I fought the 2005 election on a campaign against immigration from the then Conservative leader. I have always said, of course you have got to have proper controls on immigration, you to have to deal with those parts of the immigrant community that are rejecting the idea of integrating into the mainstream, but to allow that then to trend into anti-immigrant feeling is a huge mistake for the country."

Blair added: "People in Ukip always say other the politicians don't get it; I do get it and I get them. You look a little bit beneath that Ukip facade and you see something, in my view, pretty nasty and unpleasant. The way to deal with Ukip is to stand up to them and take them on. What they are putting before people is a set of solutions that anybody who analyses where Britain has to be in the 21st century knows are regressive, reactionary and make Britain's problems worse, not better. Attitudes that are closed-minded, anti-immigrant, anti-EU, stop the world I want to get off, those attitudes don't result in economic prosperity or power and influence in the world."

The remarks by Miliband and Blair follow an intense Labour debate after senior figures, such as the former minister John Healey, said the party had not done enough to understand the threat posed by Ukip. Critics said the leadership had adopted a complacent approach on the grounds that a strong Ukip performance would damage the Tories, thereby benefiting Labour.

Ed Balls, the shadow chancellor, voiced the concerns of some members of the shadow cabinet that the leadership had wrongly played down immigration during the campaign when he said the party needed to talk about the issue more loudly.

Miliband moved to show that he understood voters' concerns about immigration when he spoke of the difficulty of care workers who do not speak fluent English. He said of his meetings in Thurrock: "People talk to me about the way the country has been changing. They talk to me about builders from eastern Europe who are here and part of the community, care workers from overseas who sometimes don't speak fluent English. What does that say? That says there are big changes happening in this community. These are the realities of work, of family and of community."

But he flatly rejected Ukip's opposition to the EU and its plans for drastic restrictions on immigration, though he said he understood why people had concerns.

He said: "Immigration benefits our country as a whole. As the son of immigrants I know immigration needs to be properly managed. That is why I have changed Labour's position on immigration since 2010, because it is not prejudiced to worry about immigration. It is understandable.

"Labour under me won't make false promises or cut ourselves off from the rest of the world because it would be bad for Britain."

Miliband indicated that he was unlikely to adopt new immigration policies as he highlighted the policy changes he had introduced. They are: controls on people as they arrive and leave Britain; tackling the undercutting of wages; ensuring people working in public services speak English and ensuring people earn their entitlements.

Unease within Labour ranks was highlighted by one of the party's councillors in Basildon who said she feared the leadership was moving to the right. Adele Brown told Miliband: "My feeling is that the Labour party is starting to lunge towards the right and that is a concern for me. We should be addressing Ukip's policies on things that affect people – their policies on the living wage, on sick pay, on paternity pay, which they don't believe in, working hours, holiday entitlement. We should not be saying we have immigration policies too. When are we going to hear the Labour leadership talking about issues and policies that Ukip have that affect people that we have counter-policies on?"