Media playback is unsupported on your device Media caption Ed Miliband: "We became too disconnected from the concerns of working people."

Labour leader Ed Miliband has promised to deter firms from exclusively employing workers from overseas, admitting his party "got it wrong" on immigration when in government.

He said Gordon Brown and Tony Blair should not have allowed uncontrolled immigration from new EU states in 2004.

He also pledged to ban recruitment agencies which use only foreign workers at the expense of "local talent".

But the Conservatives said Labour had "no credibility" on immigration.

In 2004, the government allowed free migration to the UK for workers from EU accession states including Poland, Hungary and the Czech Republic.

'Dazzled'

But its estimates that only about 13,000 people a year would come to the country were soon proved wrong, with a peak net migration figure, from the EU and elsewhere, of 252,000 in 2010.

Some countries imposed transitional controls to slow the speed of movement.

In a speech to the IPPR think-tank, Mr Miliband said: "It was a mistake not to impose transitional controls on accession from Eastern European countries. We severely underestimated the number of people who would come here. We were dazzled by globalisation and too sanguine about its price.

Two incidents encapsulated what many saw as the Labour government's failure to "get" why so many people were worried about immigration. In 2007 Gordon Brown promised "British jobs for British workers". It was an impossible promise to keep, with the free movement of people within the European Union. Mr Brown then famously described a pensioner from Rochdale, Gillian Duffy, as a "bigot" after she raised immigration with him during the general election campaign. Ed Miliband acknowledged Labour got it wrong and in so doing alienated some of their core supporters. Expect him to take this message to key seats he will need to win back for Labour if he is ever to be prime minister.

"By focusing exclusively on immigration's impact on growth, we lost sight of who was benefiting from that growth - whose living standards were being squeezed. We became disconnected from the concerns of working people."

He said Labour had told people concerned about the biggest peacetime migration to the UK to "like it or lump it" and that the public had been "ahead of us" on the issue.

Many in the party blamed the effects on immigration, including the lowering of wages and pressures on social services, for the scale of Labour's defeat in the 2010 general election.

Acknowledging that this was a factor, Mr Miliband said some employers had a "nasty, brutish and short-term" attitude to taking on staff, leading to greater exploitation of overseas and British workers.

He added that cutting numbers of immigrants was part of the solution but "not enough". He also accused the government of being unrealistic in saying it will limit net migration to "tens of thousands", as the vast majority of those coming to the UK were from EU countries.

Instead he promised measures including:

Forcing medium and large employers to declare if more than a quarter of their workforce is foreign, so that gaps in training British workers can be addressed, allowing them better to compete

Banning employment agencies from taking on only overseas workers

Extending the scope of the Gangmasters Licensing Authority to all sectors where workers are being exploited

Setting up an early-warning system, run by the Migration Advisory Council, to highlight areas where the workforce is "dominated by low-wage labour from other countries"

Identifying where British jobseekers need better training

Tougher legislation on the minimum wage, with a doubling of the fine from £5,000 to £10,000 for those who break the law

He said he would not make "promises that can not be kept" on cutting immigration from within the EU, which is beyond the control of British governments.

But he would seek ways to "level" the playing field for British workers in the jobs market.

And he vowed that a future Labour government would introduce "maximum transitional controls" to limit migration if the EU expanded to include more countries.

Referring to the phrase used by Mr Brown as prime minister, Mr Miliband said: "We are not calling for 'British jobs for British workers' because you can't do that and we shouldn't promise it."

The Labour leader said there was "nothing wrong with anyone employing Polish builders, Swedish childminders or French chefs".

But he added: "The problem we need to address is in those areas and sectors where local talent is locked out of opportunity."

Immigration figures Net migration is around 80,000 higher, or one and a half times what it was 10 years ago

Net migration from outside the EU is 25,000, or 1.1 times higher than 10 years ago

Net migration from the EU is 67,000, or 10 times higher than it was 10 years ago

Source: BBC Research

For the Conservatives, immigration minister Damian Green said: "Until Ed Miliband supports the government's measures to cut and control immigration, Labour will have no credibility at all.

"Under his leadership, Labour have opposed our aim to get annual net migration down to the tens of thousands, and they have opposed the cap on economic migration, our changes to student visas and our reforms to family visas.

"They refuse to admit that immigration is too high, and they refuse to say immigration needs to come down."

Shailesh Vara, the Conservative MP for North West Cambridgeshire, called for an apology from Mr Miliband.

He said: "Ed Miliband could actually start apologising to people such as myself and other Conservatives who in the past have tried to talk about immigration in a measured and sensitive way, but whenever we've tried to do that we've been accused of racism by the Labour Party."

Sir Andrew Green, head of the Migration Watch think tank, told the BBC that Labour's "real concern is that they've lost an awful lot of their own supporters, who of course are the people who, mainly, suffer the consequences of immigration on this scale, in terms of social housing and so on and so forth".

But he added: "I think the other thing that was wrong with this discussion is that there's been a lot of focus on EU migration.

"The reality is this - in the Labour years there was net foreign immigration of three and a half million. Only one in five of those was actually from the European Union."