Galle: A Sri Lankan migrant aboard a boat that was controversially turned back mid-sea by Australia slammed Canberra on Tuesday over his treatment, as a court granted bail to most of the 41 asylum seekers.

As anxious relatives waited outside the court in the southern Sri Lankan city of Galle, a magistrate granted bail to 27 of the migrants and remanded five others for another two weeks in custody.

The magistrate discharged nine children in the group. The adults could face charges of leaving the country illegally, an offence that carries a maximum two years in jail.

One of the detainees, Bhamith Caldera, told AFP that he would "complain to the UN" over his treatment by Australian customs authorities and denied that he had been screened as a possible asylum seeker.

"They never asked any questions. They just wanted us to go back," he said, declining to answer if he believed he had a case for asylum. "They treated us very badly."

He said that they had been given food past its expiry date and people had been refused medicine.

"When women were down with fever, they were just given water," he added. "We were starved. Where is Australia`s human rights?"

Caldera made the comments as he and the group arrived at the court by bus and were escorted by plain-clothed police officers after spending a night in the notorious Boossa detention centre.

The complex has a reputation for torture and is used as a high-security centre for those detained on terrorism-related offences.

The four women, one of them carrying a baby that appeared only a few months old, covered their faces as they passed in front of reporters ahead of their court appearance.

"We will individually register them and the magistrate will decide a course of action," a court official told AFP on condition of anonymity.N. Saman, who was waiting outside the court, said his two nephews, aged 24 and 25, had left on the boat in early June in the hope of securing a farm labouring job in New Zealand.

"We were told that they wanted to go to New Zealand. Now we are told that they were turned back by Australia," he said.

Other relatives said the boat was meant to go to Australia, with the confusion possibly caused by people smugglers who have been known to mislead migrants about their final destination.

A man who refused to give his name said he had received a phone call from one of his relatives in detention on Monday asking him to attend court in case magistrate Umesh Kalansuriya ordered their release on bail.

"The family left about a month ago, but I don`t know where they went," he told AFP.

"The next thing I heard was when they called last night asking for help. They said they were held in Boossa."

The group was brought ashore at Galle, 115 kilometres (72 miles) south of the capital, and taken to Boossa on Monday.

Sri Lanka`s navy spokesman Kosala Warnakulasooriya said Monday that the 41 were taken into custody in "deep waters off the southeastern coast of Sri Lanka," but gave no further details.

Australia has come under fire over the transfer, with experts warning that repelling migrants after screening them as potential asylum-seekers at sea appeared to be inadequate under international law.

An Australian court has temporarily halted the transfer of a second boatload of 153 mainly ethnic Tamil asylum-seekers from being handed back to Sri Lanka.

Lawyers acting for some of the 153 took their case to the High Court on Tuesday, arguing a transfer would be illegal and they should not be returned against their will.

Australia`s immigration minister is due in Sri Lanka on Wednesday to meet top officials and hand over a patrol boat gifted to Sri Lanka.