Melbourne (Reuters) - Spain’s Ferrovial said it won’t offer in future the service of running Australia’s controversial offshore detention centers for refugees and asylum seekers, after buying a controlling stake in the Australian firm that operates the centers.

Asylum-seekers look through a fence at the Manus Island detention centre in Papua New Guinea March 21, 2014. Eoin Blackwell/AAP/via Reuters

Australia’s detention of refugees and asylum seekers in offshore detention centers in Papua New Guinea and Nauru has previously drawn criticism from the United Nations. In a statement on Friday, Ferrovial said the company had completed a buyout of 59 percent of shares in Australia-listed Broadspectrum.

On Wednesday, Papua New Guinea’s Supreme Court ruled that a detention center in Manus Island housing more than 800 Australia-bound refugees was unlawful and the country’s government said it would shut the camp. Broadspectrum runs the facility.

“In relation to the provision of services at the regional processing centers in Nauru and Manus province, these services were not a core part of the valuation and the acquisition rationale of the offer, and it is not a strategic activity in Ferrovial’s portfolio,” the company said in a statement. “Ferrovial’s view is that this activity will not form part of its services offering in the future”.

It did not elaborate.

Several hundred people rallied in Melbourne on Saturday calling for the Australian government to bring those detained on Manus Island to centers on the mainland.

Chris Breen from the Refugee Action Coalition said that the Supreme Court ruling in Papua New Guinea provided Prime Minister Malcolm Turnbull with the opportunity to change his policy.

“These camps are inhumane and now they have been ruled illegal, it is time we closed them,” Breen told Reuters.

The government’s response to refugees and asylum seekers trying to reach Australia by boat has long been a politically charged issue.

Turnbull is expected to dissolve parliament in the coming weeks and a federal election is widely expected on July 2.