A challenge by a Jewish rights organisation over the legality of local council "boycotts" on Israeli goods produced on the West Bank has been dismissed by the High Court.

Jewish Human Rights Watch (JHRW) asked for a ruling that the councils, in passing the boycott resolutions, breached equality law duties and failed to have regard "to the need to eliminate discrimination and harassment of Jewish people", or the need to foster good relations between Jewish and non-Jewish people.

Lawyers for Leicester City Council, Swansea City Council and Gwynedd Council said the case was "misconceived" and had been brought because JHRW "wants to stop local authorities debating Israel's actions".

In London on Tuesday, Lord Justice Simon and Mr Justice Flaux dismissed the claims, saying they failed in relation to each of the councils on an analysis of the facts and the applicable legal principles.

A number of councils across the country began boycotting Israeli goods in around 2009 in response to Israel's invasion of Gaza.

Lawyers for the three authorities stressed that the boycotts under challenge were in reality not affecting the procurement of goods and services and were no more than "symbolic expressions of concern" over Israeli actions, including the continuing blockade of Gaza and the illegal appropriation of land in the West Bank.

Counsel Andrew Sharland said the members were exercising their right to freedom of expression protected by both the common law and Article 10 of the European Convention on Human Rights.

But lawyers for JHRW, set up by Jewish and non-Jewish professionals to combat anti-Semitism in the UK, argued the boycott resolutions represented unlawful policies that breached the Local Government Act 1988 and the Equality Act 2010.

Their counsel, Robert Palmer, said the case was not about freedom of expression or "the lawfulness or otherwise - or even the moral rights and wrongs - of any Israeli action in the West Bank, Gaza, or East Jerusalem as the case may be".

It was about the lawfulness of the way the councils in the case were discharging their local authority functions "and the failure of these local authorities to have due regard to the impact of their actions upon the Jewish community".

In their ruling, the judges said: "The evidence is clear: the council resolutions did not override, or even affect, the lawful exercise of its public functions in relation to public supply or works contracts, and no contracts or potential contracts were affected by the resolutions."

Swansea Council leader Rob Stewart described the court's ruling as a victory for free speech.

He said: "We have stressed throughout this process - and we do so again today - that the Notice of Motion of June 17 2010 was not and has never been anti-Semitic or an attack on Jewish people. That was never our intention.

"The council has never boycotted Israeli goods and has no intention of doing so.

"It was a difficult decision to go to court on this matter.

"However, given that this was an issue about the democratic rights of councillors to speak on matters of public interest, we believed there was no other option than to defend that fundamental right in court.

"As part of the court's judgment, costs have been awarded to the council and, on behalf of the council tax payers of Swansea, we will now be seeking to recover them from the applicants."