Seven people have been killed in a bizarre religious ritual in a jungle community in Panama, in which indigenous residents were rounded up by about 10 lay preachers and beaten, burned and hacked with machetes to make them "repent their sins."

Local prosecutor Rafael Baloyes described a chilling scene found by investigators when they made their way through the jungle-clad hills to the remote Ngabe Bugle indigenous community near the Caribbean coast on Tuesday.

Alerted by three villagers who escaped and made their way to a local hospital for treatment, police found an improvised "church" at a ranch where a religious sect "The New Light of God" was operating.

"They were performing a ritual inside the structure. In that ritual, there were people being held against their will, being mistreated," Mr Baloyes said.

Reuters

"All of these rites were aimed at killing them if they did not repent their sins," he said.

About 2 kilometres away from the church building, authorities found a freshly dug grave with the corpses of six children and one adult. The dead included five children as young as a year old, their pregnant mother and a 17-year-old female neighbour.

Mr Baloyes said all the victims, and apparently all the suspects, were members of the same indigenous community and one of the suspects is the grandfather of the children who were slain.

The Ngabe Bugle are Panama's largest indigenous group and suffer from high rates of poverty and illiteracy.

The area is so remote that helicopters had to be used to ferry the injured out to hospitals for treatment. They included at least two pregnant women and some children.