TORONTO -- One of the country's largest retailers is finally off the hook for the devastating collapse of a garment factory in Bangladesh six years ago.

In a decision on Thursday, the Supreme Court of Canada refused to hear a group of Bangladeshi victims and relatives who wanted to sue Loblaws over the tragedy.

The key issue in the lawsuit was whether a Canadian court had jurisdiction to consider the claim -- of importance to companies that source product from abroad.

Both Ontario's Superior Court and Court of Appeal had previously denied the plaintiffs class-action certification in their quest for $2 billion in compensation.

The case arose out of the collapse of the nine-storey Rana Plaza on April 24, 2013, in the Bangladeshi capital of Dhaka.

In all, 1,130 people were killed and 2,520 others seriously injured. Two of the clothing-manufacturing companies caught up in the collapse were Pearl Global and New Wave, which was under contract to supply Loblaws with apparel for its Joe Fresh brand.

Two years after the tragedy, Arati Rani Das, who lost a limb and whose mother was killed in the collapse, and three other Bangladeshi citizens launched a proposed class action in Ontario against Loblaws and three affiliates.

In their statement of claim, the plaintiffs argued Loblaws was responsible for worker safety. They alleged the company knew workplaces in Bangladesh were dangerous, and had undertaken to ensure the buildings in which Joe Fresh garments were made were safe.

Superior Court Justice Paul Perell decided in July 2017 that Bangladesh's laws applied. As such, he concluded the claim had been filed too late, and that Loblaws owed no "duty of care" to the proposed class members.

"The imposition of liability (on Loblaws) is unfair given that the defendants are not responsible for the vulnerability of the plaintiffs, did not create the dangerous workplace, had no control over the circumstances that were dangerous, and had no control over the employers or employees or other occupants of Rana Plaza," Perell said.

On appeal, Ontario's top court agreed.

In its decision in December, the Court of Appeal ruled the deaths and injuries formed the basis of the claim, and those occurred in Dhaka.

The court found that Loblaws had little control over the factories and had never promised to audit Rana Plaza for structural safety. As a result, the court decided, the governing law was that of Bangladesh. The court also found the claim had been filed too late.

"It is plain and obvious that a claim based on vicarious liability against Loblaws cannot succeed under the law of Bangladesh," the Appeal Court said.

The Appeal Court also ordered the plaintiffs to pay Loblaws almost $1 million in legal costs -- a decision the Supreme Court also left undisturbed.