Claudia Paz y Paz has a tough job as the first female attorney general in Guatemala, one of the most violent countries in Latin America.

In Guatemala City, shopkeepers in cramped surroundings sell tortillas and soft drinks from behind thick metal bars that run from floor to ceiling. The well-off are retreating not just to gated communities, but gated enclaves with their own shops and gyms.

Violence deters tourists and foreign investors and hinders development. The economic cost of violence in 2006 was $2.3bn (£1.4bn), or 7.3% of GDP, according to the UN Development Programme.

The murder rate in Guatemala has decreased from its peak of 46 per 100,000 in 2009 to 34 in 2012. Last year there were 5,632 officially registered murders, down from 5,618 in 2011 and 5,690 in 2010, in a population of about 14 million. The vast majority of crimes are carried out with guns, with 11% resulting in the death of women. In 2012, 731 women were murdered; in 2013, there is evidence that murder rates are increasing.

The first half of 2013 has also seen a rise in "social conflicts", pitting local communities against companies investing in mining or hydroelectric projects, or communities fighting over land tenure. The EU, which has provided €20m (£17m) to improve the justice system, says there should be greater focus on social conflict, not just crime.

Former dictator José Efraín Ríos Montt, right, in a court in Guatemala City in January. Photograph: AFP/Getty

Paz, who has been in the job since 2010, spoke to European journalists last week about efforts to end the culture of impunity that has seen perpetrators throughout the spectrum of Guatemalan society literally get away with murder.

The highest-profile case under her watch has been the trial and conviction of former dictator José Efraín Ríos Montt in May for genocide and other human rights violations, although the verdict was annulled amid suspicions of outside pressure.

The widespread suspicion is that testimony implicating the president, Otto Pérez Melina, a commander at the time where a massacre took place, led to the annulment. This clearly puts Paz in an awkward position. She pushed the case forward, along with other high-profile prosecutions of former government officials and organised crime figures, but has played down her role.

"We had the first genocide conviction on 10 May," she says. "This was not work done by my office, but the excellent effort of victims' organisations, which did not stop claiming justice. That decision was annulled – an opinion we did not share."

The case against Ríos Montt and the former director of military intelligence, José Mauricio Rodriguez Sánchez, has been passed to a new tribunal, although legal challenges makes its renewal uncertain. Paz says a tentative date has been set for April when new judges will hear repeat testimony on massacres, rapes, torture and the forced displacement of indigenous Maya-Ixil communities.

Asked whether she had Perez's support on the Ríos Montt case, Paz chooses her words carefully. "The president, even before he was elected, stated something very important. He said he respected the independence and autonomy of the attorney general's office," she says.

Besides having to pick her way through the minefield of the Ríos Montt case, Paz has made violence against women a priority. "Until 10 years ago, aggression against women did not exist as a crime in Guatemala. It was seen as a private affair. Now two laws have been passed in which violence against women is a specific crime. The justice system is now seen as a new place for women to go to."

As part of the attempt to build trust in the justice system, Guatemala has a new forensic science unit, the National Institute of Forensic Sciences with state-of-the-art equipment to analyse DNA and speed up investigations of sexual crimes and murder. The introduction of 24-hour courts for certain crimes has reduced one the number of suspects being held for long periods without trial, one of the worst excesses of the justice system.

But there is a long way to go. Unlike most Latin American countries, Guatemala does not have a justice ministry to ensure proper independence of the judiciary. The UN special rapporteur on the independence of judges and lawyers has repeatedly drawn attention to this omission and called for changes in the rules governing the election and appointment of supreme court members.

As her term comes to an end next year, Paz has left her mark, particularly by pressing for Ríos Montt to go to court. Although she is dissatisfied with the verdict from the constitutional court, she remains firm in her belief in the power of the law. "Justice is the possibility for victims to face under equal conditions those who committed serious crimes and reaffirm their citizenship," says Paz. "It sends a powerful message for the rule of law. Nobody is above the rule of law."

Mark Tran travelled to Guatemala with the European commission