The advocate general of the European Court of Justice has said Britain is within its rights to restrict welfare payments to EU citizens living in the UK in a closely followed ruling ahead of the country's In/Out referendum on its membership of the EU.

The subject of 'benefit tourism' has evoked deep passions in the UK, with many people believing it to be wrong for EU citizens to travel to Britain and receive the same benefits as indigenous citizens who have paid taxes into the system.

A senior adviser to the European Union's top court recommended on Tuesday that it dismiss a case against Britain brought by the European Commission, which had complained that restrictions on welfare payments discriminated against non-British EU citizens.

European Court of Justice has ruled UK can stop welfare payments to jobless migrants from Europe looking for work in Britain. #afairdeal — Anne-Marie Trevelyan (@annietrev) September 16, 2015

A spokesman for the European Court of Justice said the advocate-general, Cruz Villalón, whose recommendations are generally followed by the judges, found the European Commission's complaint should be dismissed. The EU executive had said Britain was discriminating by imposing certain residence qualifications on foreign EU citizens before paying child benefit.

UK attitudes to EU labour migration and access to welfare. @Vasilopoulou_S @UKandEU pic.twitter.com/EiTdCjThKU — Policy Network (@policynetwork) September 14, 2015

In his opinion, Villalón said discrimination between UK citizens and non-UK citizens:"is justified by the necessity of protecting the host Member State's public finances, as argued by the UK. […] That process is the means whereby the host Member State is able to satisfy itself that it is not granting those social benefits to persons to whom it is not obliged to grant them" under EU directives.

Migration Crisis

The news comes on the day UK Home Secretary Theresa May delivered the most hard-line speech against mass immigration to the UK in a long time. She said the country's immigration boom was not "in the national interest" and that it was "impossible to build a cohesive society".

As Europe struggles with the migrant and refugee crisis, the issue of migration has become a political hot potato in the UK with public opinion hardening up against mass migration and keen to hold on to Britain's control of its own borders, being — as it is — outside the Schengen area of open borders.

May said: "It's difficult for schools and hospitals and core infrastructure like housing and transport to cope. And we know that for people in low-paid jobs, wages are forced down even further while some people are forced out of work altogether."