At a hearing in London in April, Supreme Court justices were told by a QC representing the families that the "failure and refusal" of the foreign and defence secretaries to "take action to inquire further into the Batang Kali massacre are unlawful".

British troops were conducting operations against communist insurgents during the Malayan Emergency when 24 plantation workers were killed.

The relatives had previously lost their case at the High Court and the Court of Appeal.

A panel of five justices, headed by Supreme Court president Lord Neuberger, today dismissed their latest challenge.

Lawyers said the case also has "huge ramifications" for Northern Ireland.

Supreme Court proceedings followed a ruling by the Court of Appeal last year dismissing a challenge by the families.

They originally suffered a defeat at the High Court in September 2012 when two judges concluded that decisions not to set up an inquiry were "not unreasonable".

At the heart of the proceedings were decisions in 2010 and 2011 to refuse a public inquiry or another form of independent inquiry into the shootings of unarmed civilians by a Scots Guards patrol.

Relatives argued that Article 2 - the right to life - of the European Convention on Human Rights imposes a duty on the UK to commission an independent inquiry despite the killings occurring before the convention was drafted and signed.

It was argued on behalf of the Government that the Human Rights Act "does not have retrospective effect and does not impose an obligation to hold an inquiry into deaths occurring several decades before it came into force".

The appellants in the case, Chong Nyok Keyu, Loh Ah Choi, Lim Kok and Wooi Kum Thai - two of whom were at Batang Kali as children - are supported by the action group Condemning The Batang Kali Massacre, a campaign in Malaysia that encompasses 568 civil society organisations.

Michael Fordham QC told the court during the hearing that relatives wished to "vindicate the legitimate interests of the deceased, in order to achieve justice, before they die themselves".

The account of the British authorities at the time was that the deceased were justifiably shot while they were attempting to escape from the patrol.

An official explanation was contained in a written parliamentary answer in Hansard, published on January 26 1949.

The importance of the action to Northern Ireland was marked by the fact that Attorney General John Larkin submitted written argument to the court on the issue, in an attempt to clarify the extent of the state's human rights obligations.

The judges also considered submissions from the Pat Finucane Centre and Rights Watch UK, which represent and advise numerous victims of the Troubles.

The families of those killed and their supporters are said to be considering petitioning the European Court of Human Rights.

A statement from their solicitors after the ruling said the families have "renewed their pleas to the Government for a compassionate and dignified solution including an apology, withdrawal of the official account in Parliament and funding for a memorial to the massacre victims".

The families' lawyer, John Halford of law firm Bindmans, said: " On 12 December 1948 British soldiers left the bodies of 24 innocent, unarmed man riddled with bullets and the British government left their families without a credible explanation.

"Our courts have decided there is no legal right to that explanation. But they have been able to acknowledge the innocence of those killed, the failures to investigate and the 'overwhelming' evidence of mass murder.

"Just as importantly, Britain has been found responsible.

"All of this creates the clearest of moral imperatives on the British Government to apologise, withdraw the false account given to Parliament and to compassionately address what has been done, including by funding a memorial.

"If it does not, the blood of those killed at Batang Kali will indelibly stain the concept of British justice."

The Supreme Court said the appeal related to a "controversial series of events" in Batang Kali in Selangor - at that time Selangor was a British Protected State in the Federation of Malaya.

The justices ruled against the Government's argument that the issues were not within the jurisdiction of the UK courts.

The court rejected the contention of the secretaries of state that, as the Scots Guards were operating within the constitutional framework of Selangor and the Federation, their acts were not attributable to the UK.

Those who were killed were within the British Army's control at the time, whether they were seeking to escape or not, and had the ECHR been in force in 1948 the killings would have occurred within the United Kingdom's jurisdiction.

The court also rejected an argument that any liabilities or obligations which the UK may have had prior to 1957 passed that year to the newly-independent Federation.

Although the justices unanimously rejected the Government's jurisdiction arguments, it dismissed the appeal brought by the relatives that a public inquiry was required on three different grounds, including under Article 2.

Lord Neuberger said the appellants contended that the killings "amounted to unjustified murder, and that the United Kingdom authorities have subsequently wrongly refused to hold a public inquiry, and have sometimes deliberately kept back relevant evidence".

He said: "The desire to discover 'historical truth' is understandable, particularly in a case where it involves investigating whether a serious wrong, indeed a war crime, may have been committed.

"However, not only is this a case where neither Article 2 nor customary international law would require such an investigation, it is also a case where the relevant members of the executive have given coherent and relevant reasons for not holding an inquiry, including expressing a justifiable concern that the truth may not be ascertainable, and a justifiable belief that, even if the appellants' expectations to the contrary were met, there would be little useful that could be learned from an inquiry so far as current actions and policies were concerned."

Lord Neuberger said it was "not as if the appellants have got nowhere" in the proceedings - the High Court and Court of Appeal "and now this court have all said in terms that the official UK Government case as to the circumstances of the killings may well not be correct and that the killings may well have been unlawful".

The court had to decide whether, bearing in mind the reasons for and against holding an inquiry, the refusal to hold one was "disproportionate". He added: "In my view, it was not."

On the Article 2 issue, the judge said the ECHR came into force for the UK in September 1953, and the UK recognised the right of an individual to petition the European Court of Human Rights in January 1966.

He ruled that the Article 2 claim failed because the Strasbourg court "would rule it inadmissible as the killings occurred more than 10 years before UK citizens had the right to petition the Strasbourg court".