Cameron backs court ruling to deny benefits to jobless EU migrants David Cameron has welcomed a judgment that EU migrants should not automatically be able to claim benefits for up to five years as a "commonsense ruling" that vindicates his arguments. The prime minister said it backed up his position that the right to work in other EU countries "should not be unqualified." But he signalled it was not the end of his ambitions for an overhaul to benefit laws in Europe as he described the judgment from the European court of justice as a "good step in the right direction." "There should be rules about restricting benefits," Cameron said on a visit to Rochester and Strood, where the Tories hope to defeat defector Mark Reckless, now standing for Ukip, on 20 November. The ruling said an EU member state - in this case Germany - was not obliged to grant social assistance during the first three months of residence. For the first five years, as in the German case, one of the conditions is that "economically inactive persons must have sufficient resources of their own." The judgment is, in one sense, good for Cameron because it may provide him with some legal backing for his plans to restrict benefits for EU immigrants even further. But it will also allow others to argue there is therefore no need for reform to freedom of movement rules at an EU level because the current law allows some flexibility. Cameron has promised to seek an overhaul of this fundamental EU principle before offering the UK a referendum before the end of 2017 if he is still in power. On Tuesday, Sophie In't Veld, first vice president of the Liberal ALDE group in the European parliament, said the ruling was a "blow to those suggesting EU free movement rules need to be dramatically curtailed." Most UK politicians, however, concentrated on the idea that the ruling will give the UK an opportunity to restrict benefits for migrants further, on top of previous measures rolled out by Cameron over the past two years. The prime minister has introduced time restrictions and qualification periods for access to the income-based jobseeker's allowance. But the Guardian reported last week that ministers are now preparing plans to bar jobseekers from the EU from receiving all out-of-work benefits once the universal credit system is completely introduced. Iain Duncan Smith, the work and pensions secretary, said: "This is an excellent ruling - and supports our view that people coming to the UK who don't have sufficient resources to support themselves and would become a unreasonable burden should not be able access national welfare systems. The case underlines what we have said for some time that free movement is not an unqualified right - and will have a major impact on the way the commission interprets law in future. The fact Germany's decision was challenged in this way is yet more evidence that the EU needs a much clearer legal framework, clarifying the original Treaties, allowing Member States to retain control over their own national welfare systems. We have been working closely with Germany on this case, and will now work with other European governments on the wide implications of the judgment in the coming days and weeks. The ruling was also welcomed by Rachel Reeves, Labour's shadow work and pensions secretary, who said her party agreed with the ruling on migrants from EU member states who travel simply to claim benefits. Labour has repeatedly called on the government to act to ensure that the UK benefit system is only there for those prepared to contribute, including extending the three month waiting time EU migrants have to wait before claiming benefits and ending the unfair practice of child benefit being sent abroad. It's now time for ministers to act," she said. Ukip said the UK should do more to stop abuse of the British benefit system while it was still a member of the EU and subject to its rules. Diane James, the anti-EU party's spokesman on home affairs, said: "The government needs to examine this judgement closely, and if need be, look to alter the rules on habitual residence which gives EU migrants open access to many UK benefits even though some of them are in reality, are not seeking work."