Luxembourg (AFP) - The EU's top court ruled on Tuesday that member states do not have to provide social welfare payments to EU citizens moving to their country solely to claim benefits.

Charges that the European Union's core freedom of movement principle has been abused by so-called "social welfare tourists" have helped drive recent gains for anti-EU parties who have campaigned for sharp immigration curbs.

The problem has become acute in Britain where Prime Minister David Cameron, fearing further inroads by the UK Independence Party to his right, has promised to limit immigration -- only to be rebuffed by the powerful British business community and German Chancellor Angela Merkel.

In its ruling on Tuesday, the European of Court of Justice said that an EU citizen going to another member state could only expect to receive social welfare benefits if his or her stay complied with the conditions of the EU directive on free movement.

"One of the conditions ... for a right of residence is that economically inactive persons must have sufficient resources of their own," it said.

"The directive thus seeks to prevent economically inactive EU citizens from using the host member state's welfare system to fund their means of subsistence."

So an EU member state would not be obliged to pay social welfare to "economically inactive EU citizens who exercise their right to freedom of movement solely in order to obtain another member state’s social assistance," the court said.

Ruling on a case brought by Germany, the ECJ said it was the national authorities who decide the payment of non-contributory social benefits.

As such, they were implementing national laws and not EU legislation, it added.

Tuesday's ruling comes the day after the head of the Confederation of British Industry told Cameron directly that EU membership was "overwhelmingly in our national interest."

Britain could look inwards, shutting itself off from the world or it could "embrace the openness which has always been the foundation of Britain's success," CBI head Mike Rake said.

In reply, Cameron rejected any idea that his promise of an in-or-out membership referendum in 2017 was causing uncertainty that could hurt the economy.

"Britain's future in Europe matters to our country and it isn't working properly at the moment and that is why we need to make changes," he said.

Earlier this month, Germany's Merkel went on record to say that the EU principle of the free movement of people was non-negotiable.

Der Spiegel news weekly said Merkel had told Cameron in October that he was approaching a "point of no return" with the EU over his immigration proposals.