SYDNEY (Reuters) - Nearly 2,000 asylum seekers held in a remote detention center in Papua New Guinea for more than two years will receive A$70 million ($53 million) in compensation after the Australian government agreed to settle their court case on Wednesday.

Slideshow ( 2 images )

Some 1,905 men who were detained at the facility between November 2012 and December 2014 filed legal claims last year against the Australian government and two contractors who ran the camp on PNG’s Manus Island.

The camp is one of two Australian facilities for processing asylum seekers that have attracted widespread criticism from the United Nations and rights groups because of their harsh conditions and allegations of systemic abuse.

Lawyers from the Slater & Gordon firm representing the men said the Australian government and security companies G4S and Broadspectrum, now owned by Ferrovial, would collectively pay the compensation.

They said the compensation would be distributed among the former and current detainees according to the length of their detention and the severity of the injuries and illnesses they alleged they had suffered. The government would also pay court costs, the lawyers told a news conference in Melbourne.

The Australian government confirmed the settlement, which it said it entered into to save taxpayers the expense of a costly trial. Immigration Minister Peter Dutton described settling the case as a “prudent” decision.

The settlement removes a major impediment to Australia ending its controversial offshore detention scheme, under which would-be asylum seekers who arrive by boat are held indefinitely in the two Pacific detention centers. The other is on the tiny and remote island of Nauru.

Australia agreed on a refugee resettlement deal with the United States late last year, under which the bulk of those detained at the two camps would be relocated and Australia in turn would settle refugees from Central America.

U.S. President Donald Trump has begrudgingly agreed to honor that deal despite earlier calling it “dumb”.

Australia has said that, once the U.S. resettlement occurs, it will no longer be responsible for the asylum seekers on Manus Island or Nauru.

Many of the claimants awarded the settlement remain on Manus Island, while others have returned home.

Majid Kamasaee, the original plaintiff in the case, was one of those who agreed to return to his native Iran.

Kamasaee said he voluntarily left Manus Island because he was denied adequate medical care for a serious skin condition.

“When I arrived on Manus they confiscated my medicine. Everyday in the harsh sun my skin felt like it was on fire,” Kamasaee said in a statement read out by lawyer Ebony Birchall.

“The scars got worse and then developed growths. I was in pain every minute of every day on Manus Island,” he said.

($1 = 1.3273 Australian dollars)