For at least five years, the Andaman coast of Thailand has been the scene of some horrific abuses, mainly against ethnic Rohingyas, a Muslim minority group fleeing persecution in Myanmar, also known as Burma.
In 2009, the Thai Navy was found to be towing boats packed with Rohingyas out to sea, and leaving them to drift. Hundreds are believed to have died.
More recently Thai police and military personnel have been accused of selling Rohingyas who washed up on Thailand's shores to human traffickers.
These abuses are in part what caused Thailand to be downgraded to the lowest rank in the annual US report on human trafficking.
Successive Thai governments have promised to stamp out this scourge.
But the recent discovery of 171 mainly Bangladeshi men being held captive in jungle camps shows how much still needs to be done.
What started as opportunistic exploitation of Rohingyas appears to have mutated into an organised slave trade.
Eighty-one of the men are now being sheltered in a local government hall in the town of Takua Pa. They sit there listlessly, some nursing ugly wounds inflicted by their captors.
At times, tears slide down their faces as they recall their ordeal, and think of homes and families in Bangladesh. They all tell very similar stories.
Eighteen year-old Abdurrahim still hobbles from a savage blow to his knee inflicted by one of his guards after he asked for more food.
Originally from Bogra, in northern Bangladesh, he told me he was trying to find work in the capital Dacca when an elderly man offered him a job paying around $6 (£3.73) a day.
He travelled with this man to Cox's Bazar, he said, and was taken to a small house up in the hills. There he was tied up, drugged, and woke up on board a boat. He spent seven or eight days at sea, he says, where he was repeatedly beaten.
After that, the group was unloaded on the Thai coast, and taken to a camp hidden in a mangrove forest. They gave us no food, he said. "We survived by eating leaves."
Absar Mia is 27, from Teknaf, close to the border with Myanmar. He is married with three young children. "My heart is burning for home," he said.
"All I think about is how I can get home, how I can see my mother again, how I can see my little boys and girl again. That's why I'm crying."
He described being offered a job by a man, and waiting for him on a hill near Teknaf. Suddenly he was grabbed, his hands tied, his mouth gagged. He said he struggled as he was taken out to a boat, and was beaten.
Ayub was working as an agricultural labourer in Chittagong, southeast Bangladesh, but he said the work ran out. A man suggested he go to Cox's Bazaar. There he suddenly found himself being grabbed, tied up and forced onto a boat which he said was already crowded with people.
He repeatedly asked where they were taking him, but said the guards threatened to kill him if he did not shut up. He, too, has three children.
That they were rescued from their captors is due to the determination of local district chief, Manit Pianthiong. A 28-year veteran of the area, who got the chief's job nine months ago, he is all too familiar with the human trafficking which goes on along the indented coastline of Takua Pa.
Mr Pianthiong says he is trying to curb all forms of smuggling, but he is focusing in particular on the human trade, which he says is damaging the image of the entire country.
He encourages people in fishing communities along the coast to alert him to any signs of large groups of people being held. That is how he heard about these three groups of mainly Bangladeshi men, and a few Rohingyas.
The first group of 37 was found last month. Then, on 11 October, his men tracked down another group of 53.
The last group, of 81, was surrounded in a forest camp near the road on 13 October. They had been driven by their guards from one camp to another in an attempt to evade the authorities. Mr Pianthiong believes many more were not rescued, and may have been sold.
Two of the guards have now been detained. One of them was identified by the Bangladeshis as the most brutal of their captors, a man they called Keke.
Whether this man, and his bosses, are brought to justice, depends on the government in Bangkok.
Mr Pianthiong said he wants to go after the trafficking kingpins in the region, people with powerful connections. But that would require him to get much stronger backing, and so far that is not happening.
Senior figures in the police and the social welfare ministry are resisting his efforts to have all the Bangladeshi men classified as victims of trafficking.
The second group of 53 has already been given that status, which gives them proper support and shelter, and would allow them to go back to Bangladesh quickly.
However, the police are talking about reversing that decision. Instead, they want then to be jailed as illegal immigrants.
It is difficult to know why they want this outcome, for people who have all the appearance of victims.
Perhaps it is to avoid having to admit that trafficking continues in Thailand. Perhaps it is because they are reluctant to go after the trafficking kingpins.
The result, though, could be disastrous for the Bangladeshis. People have been known to be stuck in Thai immigration prisons for many years. In the case of Rohingyas, some were actually sold back to human traffickers.
How Thailand handles the case of these men will surely be a test of its declared willingness to turn its back on a shameful record of trafficking, and take meaningful action to end the trade in people.