The European Commission has just lobbed a hand grenade into the political discussion about Britain’s membership of the EU by deciding to take the UK to court over the “right to reside” test it applies to EU migrants claiming benefits.

Immigration and welfare, along with the economy, invariably top the list of public concerns in Britain. In hard times, people fret more about immigrants competing for jobs, housing and stretched public services. With the lifting of restrictions on the right of Romanians and Bulgarians to work in the UK from next year, these concerns are on the rise. The idea of the EU trying to force taxpayers to increase welfare payments to migrants must seem like political manna from heaven for the anti-Brussels UK Independence party.

The case is technical and dates back to at least 2004 when Britain tightened its residency tests in response to the accession of a number of central European states. If these have treated some EU citizens capriciously that should be fixed. But the dispute is largely the product of a clash between the regulations and the UK’s welfare model, which includes many non-contributory, means-tested benefits compared with other EU member states. Contributory systems have built-in protections against so-called benefits tourism for the simple reason that you have to pay in to get something out.

The commission may feel it has no alternative but to pick this awkward fight but the UK has a reasonable defence. The case ultimately rests on the central principle of an EU citizen’s right to freedom of movement. But this is not an unfettered right. It applies only to those who are not an “unreasonable burden” on the social assistance system of the countries to which they move. Indeed, in potentially weakening that important qualification, one can argue that this case kicks at a prop that is vital to maintain public confidence in the idea of free movement.

If ever there was a case for the oft-derided principle of subsidiarity to apply, this is surely one. Not every European state has the same welfare system. In some southern European countries, for instance, there is only a vestigial safety net for those of working age. Britain is right to fight this case through the European court but it should not stop there. Other member states have expressed concerns about safeguarding their welfare systems. Britain should make common cause with allies and rewrite the rules to reflect the diversity of provision that exists.

Copyright The Financial Times Limited 2018. All rights reserved.