A critically unwell refugee baby and his parents detained on Nauru will be flown to Sydney for diagnosis and treatment at the Westmead Children’s Hospital following an order of the federal court in Melbourne on Friday evening.

Representing the Australian government, barrister Christopher Tran told the court that while medical facilities on Nauru were not adequate to assess and treat the baby, he could be flown to a hospital in Taiwan for treatment.

But Matthew Albert, a barrister for Maurice Blackburn representing the baby and his family pro-bono, said a medical team with the required expertise was ready to assess and diagnose the baby in Sydney. Albert said the Australian government had not provided enough evidence to show the hospital in Taiwan had the paediatric and diagnostic skills and equipment deemed necessary by a specialist who had assessed the baby’s case.

Taiwan also had specific visa requirements that may be difficult to arrange for the baby and his parents at short notice, Albert said, adding the baby’s father could speak some English which would make communication with doctors in Australia easier.

Justice Simon Steward, presiding over the case, said he understood the right of the Australian commonwealth to discharge care as it saw fit. But he put it to Tran that sending the baby to Australia for care, where the doctors could speak English and where travel requirements would be less arduous, would be “a less traumatic experience” for the baby and his parents.

Tran replied: “Standing here as a human being ... that would likely be the case in many instances”. But he repeated that sending the baby to Australia was not the only way for government to meet its duty of care to the baby. Tran added that while there was a plane ready to take the baby and his parents to Taiwan on Saturday, the next available flight to Sydney was not until Sunday.

But Albert responded that it was “a little bit cute” to suggest the Sunday flight to Sydney was the only option to Australia.

“I don’t dispute there’s a commercial flight on Sunday,” Albert told the court. “But that’s not the only option. My suspicion is the flight to Taiwan is not a commercial flight. We are comparing apples and oranges and in a way dressing up an apple to be an orange.”

After a short break in proceedings Tran conceded that some of the medical services the child required had not been shown to the court to be available in Taiwan, and that he would not be seeking leave on behalf of the government to gather that evidence. He said he would not contest an order to send the child to Australia for care.

The baby will be flown to Westmead within 48 hours. Steward said the baby and his parents could not be returned to Nauru once in Australia without two days’ notice. The court will sit again on 7 September to receive an update about the child’s health.

“Let us all hope and pray the child’s fit and healthy in a month’s time,” Steward said.

A lawyer with Maurice Blackburn who assisted with the case, Jennifer Kanis, told Guardian Australia that more than a dozen other cases involving sick children on Nauru had been brought to the court in 2018. In every case, the court had ordered the child be sent to Australia for treatment, she said.

“The outrage in this case, the question that has to be asked, is why the government fights these cases every time,” she said. “Surely the better response would be [for the government] to provide proper medical treatment to children who are in their care.”