After a long and arduous trial, three lions have been sentenced to life in captivity for killing and eating villagers in India.

The entire pride of 17 lions was investigated for the crime, but 14 have been found not guilty and released.

The unusual case was opened after a spate of lion killings near Gir National Forest's lion sanctuary, but the animals were rounded up after a sleeping 14-year-old boy was dragged off and killed.

Wildlife officials analysed the dung of the 17 animals and found human remains in the excrement of three lions -- one male, and two female.

They concluded the male was responsible for attacking and killing the humans, while the two lionesses had eaten the leftovers.

The big cats will now live out the rest of their lives in cages, according to the Associated Press, while the innocent ones have been released back into the forest.

It's believed overcrowding at the sanctuary may have contributed to the spate of killings.

Gir is designed for 270 lions but more than 500 of the animals now reside there, pushing prides closer to nearby villages and labourers.

Gurjarat's chief conservator Anirudh Pratap Singh told the New York Times it was "puzzling" humans were being targeted.

"We are closely observing," he said. "There is no shortage of prey in the forest. Why they became man-eaters is a concern for us as well."

Newshub.