Mexican officials said Friday they have finished exhuming the remains of 117 people buried by authorities in a common grave in the central state of Morelos.

Shoddy practices at the gravesite intended for unidentified bodies came to light last year after a judge ordered the state prosecutor's office to exhume a corpse and turn it over to family members. They found they had to dig around dozens of plastic-wrapped bodies without any documentation connecting them to case files.

The Morelos state government said Friday that the bodies had been reburied at a regular graveyard.

State prosecutors said DNA samples had been taken to help connect the bodies to people looking for missing relatives.

Because nobody was sure how many had been buried in the pit, exploratory wells were dug to prove there were no more bodies.

The exhumations came after a long battle by the families of the missing, many of whom complained of shoddy investigations into their relatives' disappearances.

Morelos, like the neighboring states of Guerrero and Mexico, has suffered drug violence and disappearances for years.