Media playback is unsupported on your device Media caption Jonathan Head has been investigating Thailand's human trafficking trade for six months

As the trade in human beings becomes more and more profitable, the BBC's Jonathan Head discovers that entire communities in Thailand are helping the traffickers.

Earlier this month, I accompanied a group of Thai volunteers through the steamy mangrove forest of an island on the Andaman coast. They were following up hazy reports of unmarked graves on the island; it was known to have been used by traffickers to hold large groups of migrants while they waited for transport south towards the Malaysian border.

They dug down deep into the waterlogged soil, before the first fragments of bone appeared. Then they pulled at a soggy wet cloth. It was a dress. Inside were the yellowing bones of a woman. Who she was, or how she died, we still do not know. But it is almost certain she was one of the migrants.

She must have endured a gruelling sea journey to reach this desolate spot. Had she lived, the ordeal ahead of her, on her route to a better life in Malaysia, might have been even worse.

The human trade

Image copyright Jonathan Head Image caption The migrants found in Takua Pa last October were in deep distress

Last October, I was in almost exactly the same area. We had dashed down from Bangkok on news that a group of migrants had been rescued by officials in the district of Takua Pa. In the community hall we found 81 men in acute distress, weeping and praying.

Rohingya Muslims have been fleeing here from mistreatment in Myanmar for several years - but this time the men were not Rohingyas. They were Bangladeshis. And some of them told us they had been forced on to the boats that transported them here.

District chief Manit Pianthong took us back to where he had found them, in the jungle not far from the site of the woman's grave. They had been starved and beaten over a period of several days.

Manit told us his district had long been used by human traffickers to transfer migrants from boats to trucks. He wanted to stamp it out. But he was getting little help from the central government, or from local law enforcement.

Image copyright Jonathan Head Image caption Volunteers help exhume migrant graves, recovering bones from the forest ground

Over several days, I watched him dealing with angry phone calls from government officials and police, criticising him for talking to the media, and demanding that he send the Bangladeshis to immigration detention centres. It was an open secret that many of the migrants sent there were simply sold back to the traffickers.

Manit used volunteers from his own staff to go out searching for the holding camps. He put a 24-hour checkpoint on the main road route south to stop the truckloads of migrants. He put the word out among fishing communities to alert him if they spotted any boats coming in.

The arrival of growing numbers of Bangladeshis, together with the Rohingyas, showed that the trade in humans was expanding. And no wonder. It was immensely profitable.

Asia's migrant crisis

Rohingya Muslims mainly live in Myanmar, where they have faced decades of persecution.

Rights groups say migrants feel they have "no choice" but to leave, paying people smugglers to help them.

The UN estimates more than 120,000 Rohingyas have fled in the past three years.

Traffickers usually take the migrants by sea to Thailand then overland to Malaysia.

But Thailand recently began cracking down on the migrant routes, meaning traffickers are using sea routes instead.

Why are so many Rohingya stranded at sea?

The perilous journey of a migrant boat that made it

The Indonesian villagers saving migrants

The business model

The humidity under the rubber trees was suffocating. A young man in a bright orange shirt moved quickly ahead of me, as I puffed uphill. There was no discernible path. Then he stopped and began talking quickly.

Six months earlier he had been living here, he said, with 600 others. He lay down among the fallen leaves and insects to show where they slept, without shelter. They took us to a tent over here, he gestured, and made us phone our parents to demand money. If they could not pay, we were beaten. And over there, he pointed, that is where we saw women being raped. People died, and they sent in trucks to take away the bodies.

This was the business model. The Thai trafficking networks bought the migrants by the boatload. The price for a cargo of 300 people, we were told by several sources, including Thai police, was $20,000 (£13,000; €18,000) or more. Then the migrants were held in the jungle until their families paid a ransom, usually $2,000 - $3,000 per person, a huge sum for people usually doing low-end jobs in Malaysia.

Image copyright Jonathan Head Image caption A Rohingya boy shows the BBC team how he had to sleep in the jungle

So how were the traffickers able to conduct this business in the midst of Thai villagers? The camp I saw was just 30 minutes drive from the city of Hat Yai. They involved the local community.

Boy, a young Thai Muslim man from a village near the camp, explained how his community was sucked into the trafficking business. A few years back, he said, he had been out hunting birds when he came across migrants, including children, being beaten in the camp. After that he discreetly started offering shelter to migrants who escaped.

"The whole community is involved", he said. "It's because of the money. The traffickers hire everyone. They hire people to keep watch on the camps, to carry food for the Rohingyas. They go round all the houses here, hiring people." With the price of rubber, their main crop, plunging, it was a tempting alternative.

He told me the young men were also offered drugs as an inducement. So if the migrants escaped - there were no fences - they were likely to be caught, and risk violent punishment by the camp guards.

Trafficking trail

The BBC has seen evidence of the complexity of the smugglers' operation at sites in southern Thailand. In the Takua Pa district, Bangladeshi migrants were rescued by authorities close to the site where the grave of a woman, thought to be a migrant, had been found months later.

On 14 May the BBC found a vessel that had been reported stranded at sea in waters off southern Thailand, near the Thai island of Koh Lipe, after local fishermen spotted the boat. It later arrived in Indonesia.

Half an hour from the city of Hat Yai the BBC saw another site used as a camp by smugglers - with help from the local community.

Official involvement

None of this would have been possible, though, without official connivance. Just how high the involvement went is still unclear. But it must have been very high.

Towards the end of last year, I was given a briefing by a senior police officer who knows a lot about the human trafficking trade. He told me of at least one huge camp, right on the border with Malaysia, where 1,000 people could be held.

Why did he not shut it down, I asked. He laughed. "You know the border is a military zone", he said. "As a police officer I can do nothing there without military approval."

He had never got that approval. Why did he not go to General Prayuth Chan-ocha, who led last year's coup, and who had pledged to end trafficking? If I try that, he said, the traffickers will be told even before I see him, and they will quickly move the camp. All he could do, he said, was to observe.

Six months later, the first mass grave, containing 26 bodies, was found in the same camp that he had been impotently watching.

Image copyright Jonathan Head Image caption Thai volunteers exhume unmarked migrant graves in the forest

It became difficult to work out who was involved, and who was not.

One local police chief told us of his efforts to stop the trade. He offered us the use of his boat to go and look for more. A day later a military unit who had taken us out on patrol with them told us the same police chief was deeply implicated in trafficking.

But then their own commitment suddenly looked uncertain when they refused to land us, as promised, in villages we were passing where migrants were believed to have been hidden.

One officer showed us several sheets of paper detailing his investigations into prominent business figures in Ranong, a province well-known for its trafficking links.

Look, everybody knew those camps were there Phil Robertson, Human Rights Watch

He had names, phone numbers, times of calls, evidence of a well-connected network. This information, he said, had been passed on to the central government. The clear implication was that the government was doing nothing. That officer has now been transferred.

"Look, everybody knew those camps were there," says Phil Robertson from Human Rights Watch. "It wasn't just the villagers in the vicinity who were working with the camps and serving as lookouts."

"These are areas at the Thai-Malaysia border which are militarised. So you had police and military in those areas. There is no way somebody would be able to operate camps of that size without somebody signing off in exchange for a 'packet'".

Will it stop?

I stood before a large crowd of Rohingyas, in another local government hall, two days after they had been intercepted. Their guards had been locked up in the police cell next door, and the police chief was questioning them and going through their mobile phones in an effort to find out who their bosses were.

Image copyright Jonathan Head Image caption A group of guards working for the smugglers in custody

I had a question for the Rohingyas. How many of them were worried about whether their families could pay the ransoms the brokers would demand? Almost every one of them raised his hand.

"We don't want to come here", said Mohammad, a teacher from Rathedaung, in Rakhine State. "We don't want to leave our motherland. But we don't have anywhere to escape with our lives. The Myanmar government is so bad. They beat us, they shoot us".

But Mohammad had little idea what awaited him in the camps, if he escaped, and ended up back in the hands of the traffickers.

Later, many of his group did just that, a military source told us, after they had been transferred to the immigration detention centre in Ranong. Possibly they were sold back to the traffickers, as many had been before them. They were all desperate to reach Malaysia, where there were jobs, families, and hope of a better life.

Image copyright Jonathan Head Image caption "We don't want to leave our motherland," said Mohammad (right) - a Rohingya migrant

Until their treatment by the Burmese government improves, Rohingyas will continue to flee.

But the Bangladeshis have a choice. Only some of them were forced onto the boats. Most were persuaded to board them, by rosy talk of well-paid jobs. Once they understood the brutal reality of the trade, many of them wanted to go home.

The Thai ransom business had become so lucrative that the traffickers have extended their operations into Bangladesh, where there is already a well-established network of labour brokers. If the networks are broken, the numbers boarding rickety boats will probably fall sharply.

Image copyright Jonathan Head Image caption Thai soldiers patrol Ranong

The crackdown

For months we talked to military and police officers who seemed genuine in their wish to stop trafficking. They said they were making progress, but they never seemed to have enough evidence to arrest, or even question, powerful figures in the provinces Ranong, Satun and Songkhla who were believed to be running the business. What seemed to be missing was political will.

It was the discovery of the first mass grave that shocked the government into action.

The many appalling tales of brutalities we had heard, from people held in the camps, were vindicated by the bones exhumed from the damp, tropical soil.

At the time of writing, more than 80 arrest warrants have been issued, and more than 30 people arrested. They include one very prominent businessman from Satun, a few government officials, but so far no military officers. More than 50 police officers have been transferred.

Will this anti-trafficking drive be sustained?

"We believe there are some much more senior people that were involved in making money off these rackets than have come to light so far," says Phil Robertson. "There is a lot more to be done, a lot more to be uncovered."

Read the terms and conditions.