JAKARTA, July 9 (Reuters) - An Indonesian court has acquitted a former government official accused of human trafficking after people were found in cages near his palm oil plantation, a ruling the country's rights body said on Tuesday signalled impunity for state actors.

Prosecutors have vowed to appeal Monday's decision by judges of a North Sumatra court that the former regional official, Terbit Rencana Perangin Angin, was not guilty of the charges of human trafficking, torture, forced labour and slavery.

The grisly scandal in the world's largest palm oil-producing nation first emerged in 2022 when police investigating the government official for corruption found people detained in cages on his property.

A police investigation found 665 people had been held in cells with iron bars on his property since 2010, court documents showed.

The acquittal as unjust, said Anis Hidayah of Indonesia's human rights commission, however.

"The ruling shows that there is impunity where one of the perpetrators is a state actor," she said. "It also harms the sense of justice."

Prosecutors will file an appeal, said Yos A Tarigan, a spokesperson for the attorney general's office in the region.

A lawyer for Terbit could not immediately be reached, but speaking outside court on Monday, he thanked the judges who freed him, media said.

The former regional head, who was jailed for nine years for corruption in 2022, had previously claimed the detained individuals were participating in a drug rehabilitation program.

But prosecutors said they were tortured and forced to work on his plantation instead, with court documents showing that three died at the site.

An environmental investigative group, the Gecko project, later found the plantation had supplied palm oil to major global brands.

In 2022, eight people were found guilty of premeditated murder and violence in connection with the case and sentenced to a maximum 3 years in prison, according to local media reports. (Writing by Kate Lamb; Editing by Clarence Fernandez)