The Home Office was forced to back down in the battle over its so-called 'racist vans' today, after clients of a migrant's rights groups won a key legal battle.

Two clients of the Refugee and Migrant Forum of East London forced the Home Office to admit it had a legal duty to consult affected groups before it went ahead with the scheme.

"My clients are very pleased and they very much hope the Home Office doesn’t try anything like this again," solicitor Louise Whitfield told Politics.co.uk.

"I'm surprised the Home Office didn't think the Equality Act was engaged when they chose to go ahead with the pilot.

"From the information we were provided with by the one of the campaign groups, they had actually asked them what steps they had taken and the Home Office said they didn’t need to."

The legal ruling is a major victory for migrants groups, which had been appalled by the pilot scheme.

"The Home Office is conscious that the pilot scheme has provoked strong views from a number of individuals and groups," a Home Office spokesperson wrote to Deighton Pierce Glynn solicitors.

"I am happy to give you an assurance that if the Home Office were to carry out any further campaigns we would have due regard to the effect this will have on migrants living lawfully in those communities and, in doing so, would consider the views of your clients and others as set out in your correspondence."

The letter adds: "In light of the above commitment we believe that any proceedings for judicial review would be academic.

"I would hope they could be resolved amicably without resort to unnecessary legal proceedings."

The vans, which were driven around multicultural parts of London, told illegal immigrants to "go home" – a phrase commonly used by the National Front in the 1970s.

They are also subject to an inquiry by the Advertising Standards Authority (ASA).

The Home Office has accepted that it must have "due regard" for the Equalities Act before it undertakes any such scheme – including the need to eliminate harassment and discrimination on the basis of race or religion and the need to foster good relations between people from different ethnic or religious groups.

Raymond Murray, one of the claimants, said: "Hopefully they'll never try a stunt like this again."

The pilot scheme was anyway unlikely to go nationwide, after a variety of political figures as diverse as Vince Cable and Nigel Farage branded it "offensive" and "nasty".

Downing Street did, however, insist the pilot scheme was successful.