European Union (EU) migrants who were “illegally” detained and deported after sleeping rough on British streets are set to be paid hundreds of thousands of pounds in compensation.

Many of the migrants were removed as part of a programme which began in 2015 to target the sharply rising numbers of Eastern European migrants bedding down on London’s streets, which successfully reduced homelessness in the capital.

However, a judge ruled at the end of last year the action was discriminatory and broke EU freedom of movement rules.

Figures seen by the BBC indicate that in the year to May 2017, 698 homeless EU nationals were targeted and removed from the country, and law firms have told them that at least 45 migrants are currently pursuing claims.

Each case is likely to be worth thousands of pounds, and the taxpayer-funded payouts will vary according to the time spent in detention and other factors.

A left-wing pressure group is already preparing a complaint to the European Commission. https://t.co/BAMDV0sl3Q — Breitbart London (@BreitbartLondon) October 23, 2017

Leonie Hirst, an immigration and public law barrister, said anyone from the EU or the European Economic Area who had been detained or deported in the targeted scheme could now make a potential claim.

“The EU law is clear and very robust, but the policy was a very flimsy attempt to misuse the law, simply to meet immigration targets,” she told the BBC.

“I think it is highly unlikely, particularly given that people were targeted who were working, that this policy has done anything except cost significant amounts of public money.”

Tomas Lusas, a migrant from Lithuania, has already won £10,000 after immigration officers arrested him in 2016 for sleeping on the streets in west London.

The Home Office has previously defended their policy, saying it was a response to “persistent and intentional rough sleeping” by large numbers of Central and Eastern European migrants who arranged no accommodation.

Immigration enforcement units that implemented the policy worked with local councils, the police, and homelessness charities including St Mungo’s and Thames Reach.

However, campaigners took up the case and argued that the “regular raids” on locations where migrants lived were illegal.