Palestinian rights campaigners have hailed a "historic victory" after the Supreme Court ruled that the Government's guidance on pension schemes is unlawful.

The Palestine Solidarity Campaign (PSC) took legal action over guidance which it argued unlawfully prevented funds set up under the Local Government Pension Scheme (LGPS) from engaging in boycotts and the "ethical divestment" of companies accused of being complicit in Israel's occupation of Palestine.

Government guidance issued in 2016 stated that "using pension policies to pursue boycotts, divestment and sanctions against foreign nations and UK defence industries are inappropriate" unless formal sanctions had been put in place by the Government.

It also said that LGPS funds should not pursue policies that are "contrary to UK foreign policy or UK defence policy".

The High Court initially ruled that the guidance was unlawful, but that decision was overturned by the Court of Appeal in June 2018 following a challenge by the Department for Housing, Communities and Local Government.

However, in a judgment delivered remotely on Wednesday, the Supreme Court ruled by a three-to-two majority that the guidance was unlawful.

In his judgment, Lord Wilson said the parts of the guidance which related to boycotting foreign nations and UK defence industries, and pursuing policies which were contrary to that of the Government, represented "an attempt to enforce the Government's foreign and defence policies".

He said then communities secretary Sajid Javid "went beyond his powers" by issuing those parts of the guidance, adding: "Power to direct how administrators should approach the making of investment decisions by reference to non-financial considerations does not include power to direct (in this case for entirely extraneous reasons) what investments they should not make."

Lord Carnwath, who agreed that the guidance was unlawful, said in a separate judgment: "The attempt of the Secretary of State to impose policy choices was objectionable ... because they were choices to be made by the authorities, not by central government."

Lady Arden and Lord Sales, who found that the guidance was lawful, said in a dissenting judgment that the guidance "does not purport to tell administering authorities what investments they must hold".

They added that the LGPS is "liable to be identified with the British State" because "the precise niceties of how investment decisions are taken are not likely to be recognised or understood".

The two judges said that meant that "if the managers of funds within the LGPS decided to boycott Israel, that could readily be portrayed as the British State ... deciding to boycott Israel", which "could well fuel difficult and sensitive tensions in society".

Kamel Hawwash, chairman of the PSC, said: "This historic victory represents a major win not just for the campaign for Palestinian rights, but for the fundamental principles of democracy, freedom of expression and justice.

"The Supreme Court ruling sends a decisive message to the UK Government that they should not be dictating how Local Government Pension Schemes choose to invest their funds, including choosing not to invest in companies complicit in Israel's human rights abuses.

"At a time when Israel is continuing to ramp up its oppression of the Palestinian people and its illegal acts, including annexing large swathes of the illegally occupied West Bank, the Government should be acting to uphold international law and defend human rights, not attacking peaceful campaigns which seek to do precisely that."

Jamie Potter, a solicitor at Bindmans who represented the PSC, said: "We welcome the Supreme Court's confirmation that the Government went too far in imposing its political opinions on to the management of the money of LGPS members.

"LGPS members now have the freedom to pursue their own principles in respect of the role of the arms trade and foreign countries in violations of human rights around the world when determining how their pension monies are invested."

A Government spokeswoman said: "We are committed to ensuring public bodies take a consistent approach to investments and to stop local boycotts. We will therefore bring back new legislation that addresses the technical points raised by the Supreme Court."

By Sam Tobin, PA