Australia is resisting mounting international pressure not to deport child asylum seekers, with a minister warning that allowing them to stay could attract more refugees to come by boat.

Australia's three-year-old policy of paying the tiny Pacific nation of Nauru to accommodate asylum seekers who attempt to reach Australian shores by boat survived a challenge in the High Court on Wednesday.

The test case ruling means 267 asylum seekers, most of whom came from Nauru to Australia for medical treatment or to support a family member who needed treatment, face potential deportation back to Nauru.

Immigration minister Peter Dutton said that asylum seekers, including children, would be returned to Nauru once their medical needs had been met.

"We have to be compassionate on one hand, but we have to be realistic about the threat from people smugglers," he said.

"We're acting in the best interests not only of these children, but children that would follow them."

The government has all but stopped the trafficking of asylum seekers from the Middle East and Asia in rickety Indonesian fishing boats during the past two years by refusing to allow new arrivals to ever settle in Australia.

It argues the policy has saved lives because asylum seekers were no longer drowning at sea during long and treacherous voyages from Indonesian ports.

Human rights agencies have called for the asylum seekers to be allowed to stay, with most focus on the 54 children and 37 Australian-born babies among them.

Several churches in Australia have declared themselves places of sanctuary for asylum seekers facing deportation, a symbolic gesture that carries no legal consequences for authorities.

The UN High Commissioner for Human Rights, Rupert Colville, said changes made by the government last year to safeguard its deal with Nauru against the High Court challenge "significantly contravenes the letter and spirit of international human rights law".

The United Nations Committee on the Rights of the Child reminded Australia that under the terms of the Convention on the Rights of the Child, the best interests of the asylum seeker children should be a primary consideration in deciding whether to deport them.

The Australian Human Rights Commission, a government-funded independent agency, reported that a medical team which examined children held an immigration detention centre in Darwin found many had been severely traumatised by their experiences on Nauru.