Top EU court rules against 'welfare tourists'

European Union countries can block jobless immigrants from receiving welfare benefits, Europe's top court said on Tuesday, in a ruling likely to aid British Prime Minister David Cameron's efforts to tackle so-called 'welfare tourism'.

Under growing pressure from the anti-EU UK Independence Party (UKIP) ahead of a May 2015 national election and from some of his own lawmakers, Cameron has said he would try to curb EU immigration if re-elected. Critics of Cameron argue his approach to the EU could undermine its principle of freedom of movement.

Read MoreThe EU is one big welfare Ponzi scheme

Larry Washburn | Getty Images

"Economically inactive EU citizens who go to another member state solely in order to obtain social assistance may be excluded from certain social benefits," judges of the Court of Justice of the Europe Union (ECJ) said.

They were ruling on a case involving Romanian Elisabeta Dano and her son who applied for a form of German welfare benefit.

German authorities rejected their request, prompting Dano to appeal to a German court which subsequently sought advice from the Luxembourg-based ECJ.

Read MoreMerkel 'putting her foot down'

Cameron has promised to try to reshape Britain's EU ties before holding a referendum on the country's EU membership by 2017 if he wins next year's election.

"One of the things that(the ruling)...underlines is that the freedom of movement, as the prime minister and others have said, is not a unqualified right," a spokesman for Cameron said. "We will look very carefully at what we and other governments can do working together in response to this."

Read MoreSwedes want morewelfare: Prime Minister

Cameron's Conservatives want to stop what they regard as welfare abuse by poor immigrants from eastern Europe with no jobs and no health cover, and ease pressure on local services such as health and housing. Critics accuse him of exaggerating the problem to curry favour with voters who might turn to UKIP.

Cameron's bid to cap immigration in a more systematic way has provoked warnings from the European Commission, German Chancellor Angela Merkel and other EU leaders who regard freedom of movement as sacrosanct.