The government is in a mess over immigration. Its statistics are a shambles, policy is confused and its pronouncements are all over the place. Instead of putting a positive case for immigration, it appears in turn weak, defensive and outright hostile. No wonder it is on the back foot.

It needn’t be so. The government should be pointing out that allowing the Poles and other eastern Europeans who joined the EU in 2004 to come and work here is a key reason why Britain is still enjoying its longest ever economic boom. Thank goodness its forecast that only 13,000 would come was a huge underestimate! It should support its case with heavyweight research that changes hearts as well as minds, along the lines of the Stern report on the economics of climate change. And it needs to do more to tackle the issues, notably the unresponsiveness of public services, that can make immigration problematic.

Hard-working migrant workers have given the economy a new lease of life. The Poles building affordable homes for key workers, Lithuanians cleaning hospitals and Czechs caring for the elderly are delivering higher living standards and better public services for all. Many are doing jobs that British people no longer want: as the head of any retirement home can attest, suitable British candidates do not apply. And because the new immigrants are more willing to move to where the jobs are, and to change jobs as conditions change, they have made the economy more dynamic, enabling it to grow faster for longer without running into inflationary bottlenecks – thus keeping mortgage rates down. So when the Conservatives propose to curb immigration, Labour should make clear that this would lead to higher interest rates for everyone and granny making do with less care.

Instead, the prime minister echoes the National Front by calling for ‘British jobs for British workers’. That is not only economically incoherent, it is politically inept. As Gordon Brown well knows, there is not a fixed number of jobs to go round. When women started working in large numbers, they did not deprive most men of their jobs – and nor are immigrants stealing ‘British’ jobs. Foreigners don’t just take jobs, they also create them: when they spend their wages, which creates extra demand for the people who produce the goods and services they consume, as well as in complementary lines of work. The influx of Polish builders, for instance, has created new jobs for people selling building supplies, as well as for interior designers. A foreign childminder may enable a British nurse to go back to work, where her productivity is enhanced by foreign doctors and cleaners. Of course, some people may lose out from immigration, as from any change, and the government must be there to help them, yet unemployment is no higher than it was three years ago and wages are higher. The TUC unabashedly supports the free movement of workers within the EU – and so should Labour.

Brown’s balls-up has provided political cover for the Conservatives to attack immigration without being accused of being racist. The two Davids, Cameron and Davis, have jumped at the chance. The truth is that while it is not necessarily racist to oppose immigration, it often is. Psychological studies confirm that opposition to immigration tends to stem from an emotional dislike of foreigners; intelligent critics then construct an elaborate set of seemingly rational arguments to justify their prejudice. When immigrants are out of work, they are scrounging from the state; when they are working, they are stealing our jobs. When they are poor, they are driving standards down; when they are rich, they are driving prices up. One Tory politician with whom I was debating bemoaned that Poles were earning misery wages and living in squalid conditions 12 to a room, and then blamed them for rising house prices. Immigrants can’t win: they’re damned if they do and damned if they don’t. So while it’s important to address people’s fears and consider people’s arguments, it is also important to expose the xenophobia that often lies behind them.

But what to do about white working-class Labour voters who feel left behind by economic change? For sure, the government should do more to acknowledge their pain. Extending schooling to 18 is a good way of building on the successes of the New Deal. Advancing equality of opportunity must always be a priority. But helping the disadvantaged to get a fairer chance in life should not slip into validating the prejudice that their plight is due to their immigrant, or non-white British-born, neighbours. The poor ethnic minority communities in Oldham or Burnley are a symptom, not a cause, of deprivation.

Nor are immigrants to blame for the shortage of social and other affordable housing, which is mostly due to planning restrictions and the failure to build enough new homes. The government’s bold plans to build 3 million of them – no doubt with the help of plenty of Polish labour – will certainly help. The Tories’ objection that Britain is full up is nonsense. Even now, nearly three-quarters of the country remains agricultural land. At the government’s target density of 40 homes per hectare, 3 million new homes would take up a measly 0.31% of Britain’s total surface area – and even less if they are built on brownfield sites.

Certainly, though, public services need to become more responsive to change of all sorts. This is not just a matter of better planning, based on more accurate statistics; it is about greater adaptability. In our globalising world, tastes and technologies are in perpetual flux and economic opportunities no longer stop at national borders. It is the source of our prosperity – economic growth ultimately comes from replacing old with new – but also unsettling for many. The solution is not to try to make the world stand still; it is, as Bill Clinton put it, to make change our friend. When conditions change, the NHS, schools, the police and public transport must adapt. Irrespective of immigration, we need public services that are more responsive to people’s changing needs.

Ultimately, the immigration debate is about what kind of Britain we want to live in. Do we want a closed, stagnant and conservative society, or an open, dynamic and progressive one? Labour should be unashamedly in favour of the latter. When the likes of Migrationwatch and their Tory allies warn of impending doom if the non-white and foreign-born population of Britain continues to rise, we should point out that in London three in 10 people are already foreign-born – and far from being a hellhole, it is a bustling metropolis that fuels Britain’s prosperity. Immigrants’ collective diversity and dynamism help spur innovation and long-term economic growth, because people who think differently can solve problems better and faster, as a huge volume of research shows. Twenty one of Britain’s Nobel laureates arrived as refugees; Google, Yahoo! and eBay were all co-founded by immigrants who came to the US not as highly-skilled graduates, but as children.

Opening the borders to eastern Europeans was brave and right – and in any case, it is done. To make the most of Britain’s new wave of immigration, we should treat it as an opportunity, not a threat. It is a symptom of success, not of failure. The only sure way to turn the clock back to the early 1980s – when people were fleeing Britain rather than flocking here – is a devastating recession. Surely even the Conservatives don’t want that?