Papua New Guinea's Supreme Court has ruled Australia's detention of asylum seekers on Manus Island is illegal and the two governments must end the detention of asylum seekers in PNG.

The case was brought by former opposition leader Belden Namah in 2013. The initial case was rejected, before being relodged in 2014.

It centred on whether the memorandum of understanding between Australia and PNG to house Australian immigration detention facilities was in breach of the PNG constitution.

The lawyer acting for Mr Namah, Loani Henao, told SBS that the "decision is that Australia and PNG are to take steps forthwith not to breach further the constitutional rights of the asylum seekers".

“Section 42 of PNG’s constitution, it guarantees freedom of persons entering the country, including foreigners. Unless the foreigner has broken some law of this country, then they will be subjected to detention or placed in custody," he said.

Related reading Dutton denies Manus centre closure

“The asylum seekers that have come in here are not of their own volition, but at the Australia and PNG governments’ own arrangement.

“They brought the asylum seekers into the country against their will and so (the asylum seekers) have not broken any Papua New Guinea law, yet they were kept in custody in the detention centre and that breaches Section 42 of our constitution.”

Mr Henao said the decision meant two Memorandum of Understandings signed between Australia and PNG in 2012 and 2013 setting up the Manus processing centre were “unconstitutional and have no effect”.

He said further action would be taken against the PNG government for contempt of court if it did not act quickly to implement today’s decision.

“They must demonstrate they are taking steps to give full effect to the orders of the Supreme Court,” he said.

Related reading Asylum seeker case upsetting: Morrison

Mr Henao said Mr Namah was “over the moon” with the decision.

But in a statement to SBS, a spokesman for Immigration Minister Peter Dutton said the decision was made by PNG and Australia was not party to the proceedings.

"It does not alter Australia’s border protection policies – they remain unchanged," the spokesman said.

"Those in the Manus Island Regional Processing Centre found to be refugees are able to resettle in Papua New Guinea.

"Those found not to be refugees should return to their country of origin.

"People who have attempted to come illegally by boat and are now in the Manus facility will not be settled in Australia."

Related reading PNG PM flags end of Manus detention

The Australian Human Rights Commission has welcomed the court decision.

“This ruling is further confirmation that Australia’s detention policies are increasingly out of step with international norms," said Commission President Professor Gillian Triggs.

“The Court’s decision affirms the Commission’s long-standing concern that the prolonged and indefinite detention of refugees and asylum seekers in Papua New Guinea may lead to breaches of our obligations under international law."

Aurora Adams, Human Rights Campaigner for GetUp, told SBS the government needed to bring detainees to Australia.

"It is time to stop the abuse of vulnerable people who only ask for safety and the opportunity to rebuild their lives," Ms Adams said.

"The moral case is clear, there is no justification for locking people in offshore prison camps indefinitely." The Manus Island processing centre currently holds 850 men. Another case brought by the detainees themselves, challenging the legitimacy of their detention, is still before the courts.

Read the decision here: