It has suited government ministers, the CBI and the most backward parts of the British media to present the multiple walkouts by engineering construction workers at refineries and power stations across Britain during the past week as a spasm of xenophobic protest against foreign workers and migration. For Gordon Brown, Peter Mandelson and champions of free-market globalisation, this is an indefensible rejection of free trade based on a self-defeating misunderstanding of the facts. As Philippe Legrain wrote in the Guardian yesterday, the strikers have "got it all wrong" by allegedly blaming foreign workers for the mess we're in.

Meanwhile, the anti-union Mail, Express and Sun have expressed their honeyed "understanding" for people they would normally castigate as wreckers and layabouts. So ingrained has this view of the strikes become that BBC news on Monday managed to edit a striker's comment in such a way that it appeared he was refusing to work with Italian and Portuguese workers, when he was in fact complaining that he had no chance to do so.

But in reality - as Derek Simpson - joint leader of the Unite union, said, the campaign of strikes "is not about race or immigration, it's about class". This is a battle for jobs in a deepening recession and a backlash against the deregulated, race-to-the-bottom neoliberal model backed by New Labour for a decade and now so clearly falling apart.

There certainly has been a danger that the dispute could be diverted into a chauvinistic blind alley, not least because of the cue given by Brown's cynical and fatuous use of the British National Party's slogan "British jobs for British workers", which was then thrown back in his face by the strikers.

But it hasn't happened. The strikers haven't scapegoated the non-union Italian, Portuguese, Spanish and Polish workers brought in by subcontractors to replace local labour, let alone called for their sacking or repatriation. They've targeted the employers and the government. The more nationalistic slogans have largely been replaced - "workers of the world unite" even made an appearance at Total's Lindsey oil refinery - and union activists have made short work of BNP infiltrators.

Far from being any kind of echo of the small minority of east London dockers who backed Enoch Powell in 1968, the real nature of this dispute was shown by the hundreds of Polish workers who joined the sympathy stoppage at Langage power station in Plymouth on Tuesday: not a campaign for privileges for indigenous against foreign workers, but for the rights of access of all workers in Britain to jobs, and against the use of foreign-based contract labour to exclude or undercut them.

That was underlined yesterday by a joint statement in the name of engineering, construction and chemical workers' unions across Europe identifying the British strike campaign as part of a wider expression of "anger by working people at the prevailing EU settlement which prioritises the needs of business and capital over those of labour".

The signs were yesterday that the striking workers at the Lindsey refinery had made a significant breakthrough after shop stewards agreed to recommend a Total offer reportedly opening up half the construction work currently contracted to the Sicilian firm Irem to British employees, without loss to the Italian or Portuguese workers.

Total insists that union-negotiated pay rates weren't undercut by the Irem contract (subcontracted through a US firm), though British workers suspect they may have been through charges or tax arrangements. But the effect of such contracting chains is to give the whip hand to employers to play one national group off against another and, in this case, to deny jobs to local workers at a time of sharply rising unemployment.

The dispute in any case goes far wider than one site. The focus is now expected to shift to the new Staythorpe power station in Nottinghamshire, where Alstom is using subcontracted Polish and Spanish labour, the refusal to employ British-based workers has been more direct, and the undercutting less open to question.

Underlying it has been the unpicking of the much-vaunted European social model - and the 1996 posted workers' directive in particular, intended to protect EU workers from exactly the kind of social dumping through contracted labour which is at the heart of this dispute. As usual, the government went for the weakest version, only requiring the minimum wage and basic rights for groups of workers shipped in from elsewhere in the EU. Both the directive and wider union rights have now been undermined by a series of European court judgments which have tilted the balance further in favour of corporate freedom and against workers' protection. And once again last month, Britain opposed efforts to reverse the impact of the court decisions and strengthen the directive.

No doubt New Labour ministers would regard such moves as protectionism, locked as they are in a discredited free-market mindset. But the idea that encouraging European corporations to send groups of workers back and forth around the continent to live on barges hundreds of miles from home, while others are thrown out of work, is a progressive step - or that it will generate the productivity growth to propel Europe out of recession - is evidently absurd.

Whether these unofficial strikes now fizzle out or not, they represent the first time since the economic crisis went critical that any section of the British public has moved beyond the role of passive spectators and taken matters into its own hands. And although the walkouts are illegal under anti-union legislation, such is the strength of the workforce and public support that employers have so far stayed well away from the courts.

By promising talks with the industry about giving local labour its share, Brown yesterday finally seemed to be recognising that inaction is no longer an option. But talks won't go far enough. Britain likes to hide behind European legislation, but other governments have shown local employment and social clauses can be included in public contracts under EU rules - and the authority to impose such conditions on new power station licences already exists if ministers are prepared to use it. The strikers have driven the corporate threat to jobs and working conditions to the top of the national and European agenda. Unless the government moves fast, it risks inflaming the very xenophobia it has been warning against.

s.milne@theguardian.com