SYDNEY - Australia’s detention of 157 asylum-seekers at sea for weeks in June was legal, the nation’s High Court found Wednesday in a win for the government’s hardline immigration stance.

In a tight 4-3 decision, the court ruled the government was entitled to hold the group of Tamils from Sri Lanka on a customs ship with a view to return them to India - where they had set out from.

The ruling means they are unable to seek compensation for their month-long detention. “I am pleased with the result,” Immigration Minister Peter Dutton told reporters in Canberra. “It has vindicated the government’s position and we welcome the result.”

The case was mounted by an asylum-seeker, only named as CPCF. Lawyers for the man, who is being kept with his family and the other Tamils in a detention camp on the Pacific island of Nauru, said the outcome was disappointing.

But they said the case helped to shed light on the government’s treatment of the asylum-seekers at sea.

“What’s been important through the case is that it brought this vital scrutiny, breaking the secrecy around our client’s detention,” the executive director of the Human Rights Law Centre, Hugh de Kretser, told reporters. “It was important that these serious and untested questions under Australian law were brought to the High Court.”

The High Court decision cannot be appealed. De Kretser said his client was “sad and disappointed by the decision” but his focus was on his claim for refugee status in Nauru.

“At least one of the 157 on board has had his refugee claim determined and has been found to be a refugee and has been released into the community,” he said.

“My understanding is the others are waiting on their decisions to be processed.”

Lawyers had claimed their clients were falsely imprisoned on the ship. Their case centred around whether Canberra had the power to remove asylum-seekers from its contiguous zone, just outside territorial waters, and send them to other countries.

The decision came as the Australian government hailed its “Operation Sovereign Borders” policy of turning back boats carrying asylum-seekers trying to enter the country, as a success.

“Only one vessel has arrived in Australia in 2014, and all of those aboard that vessel were transferred to Nauru,” operation commander Lieutenant General Angus Campbell said Wednesday.

There had been “15 returns of various forms during the course of Operation Sovereign Borders”, including boats turned back to Indonesia and Sri Lanka, instances where asylum-seekers were taken back by foreign countries, and rescues at sea.

Since July 2013 the Australian government has sent asylum-seekers arriving on boats to Papua New Guinea’s Manus Island and Nauru.

They are denied resettlement in Australia even if they are genuine refugees.

The government has said the policy is necessary to stop the flow of so-called “boat people” arriving in Australia.

They had previously been arriving almost daily in often unsafe wooden fishing vessels, with hundreds drowning en route.