Australia’s highest court has ruled that the country’s policy of sending asylum seekers to migrant camps in Papua New Guinea is valid.

Thursday’s decision by the High Court of Australia follows a ruling by Papua New Guinea’s Supreme Court last year that found Australia’s detention of asylum seekers on the Pacific nation’s Manus Island was unconstitutional.

Both Australia and Papua New Guinea have said the Manus camp will close by October, but the fate of the men living there remains in doubt.

The High Court challenge to Australia’s policy was launched by an Iranian asylum seeker who has been held on Manus since 2013.

The court found that the Australian government was not constitutionally limited by any need to conform to the domestic law of another country.