Mexico's attorney general's office announced the resignations of federal prosecutors of 21 out of 32 states amid a widespread purge of the department.

Attorney General Marisela Morales said in a statement shortly afterwards that "purging is fundamental within the PGR (Attorney General's Office) to give the results that citizens are legitimately demanding."

The resignations were submitted on July 29, said Rosa Elena Torres, state office coordinator, in a short announcement without giving further details.

Among those who quit were the federal prosecutors for Mexico City as well as Michoacan, Tamaulipas and Coahuila, some of the country's most violent states.

Mexico's attorney general's office is responsible for investigating federal crimes, including drug trafficking, organized crime and weapons trafficking.

The justice system is widely criticized for impunity rates of up to 90 percent in a country where the number of homicides reached a record high of more than 24,000 in 2010.

Morales has led a purge since taking over in April, including removing 462 officials from their posts and charging 111 with crimes such as fraud, robbery and abuse of power.