Under the old “inquisitorial” system, prosecutors had outsized power, and defense attorneys had no ability to challenge the evidence put forward by the prosecution. The presumption of innocence was meaningless, in part because people charged with crimes could languish in jail for years before a case was decided. And victims rarely saw justice, since barely one crime out of 100 was prosecuted.

The sweeping package of legislative changes and constitutional amendments that aimed to transform the structure of Mexico’s judicial system was enacted in 2008, and it was supposed to be fully operational in the federal courts and all of Mexico’s 32 state court systems by 2016. But three years on, many states are still struggling to adopt the reforms.

Still, Hernández said, even in Puebla, which has lagged other states, the change can already be felt. For example, both victims and the accused are now afforded more rights in the criminal justice system.

“It was common knowledge that our old system had a lot of human rights violations,” she said. “A suspect’s confession was the highest form of proof. [In Spanish, they call it, ‘la reina de las pruebas,’ or ‘the queen of evidence.’] And confessions were sometimes obtained through torture.”

Today the law explicitly bans torture, and there are safeguards in place to reduce its likelihood: A confession can’t be used in court unless it was obtained in the presence of the suspect’s defense attorney. The reforms have moved Mexico to an “adversarial” legal system, more like that in the United States, in which trials are conducted in open court, before a judge who is a neutral arbiter (Mexico did not adopt a jury system). Lawyers can cross-examine the other side’s witnesses. And defendants have the right to counsel, even if they can’t afford to pay for it.

These days, there's much less room for abuses, Hernández says, now that hearings in Mexico are open to the public, and lawyers can challenge evidence presented by the other side.

In addition, police are no longer just patrol officers tasked with preventing crime. They have new responsibilities to gather evidence and maintain the integrity of crime scenes. But investigating crimes is a whole new skill set, and training for police is lacking in many parts of Mexico. In Puebla, part of Hernández’s work is to train officers for their new role.

And Hernández and the other professors have already begun teaching their law students in Puebla how to work in the re-made courts. But their visit to San Francisco’s Hall of Justice gave them a first-hand look at how a veteran prosecutor and public defender built their cases. They also spent a day at the UC Berkeley School of Law, where a pair of instructors coached them on how to teach students the soft skills needed for oral trials — to think on their feet, to communicate verbally, to be willing to try something new and fail and try again.

The visits were part of a two-week training course in California, organized by the Justice in Mexico project at the University of San Diego, and funded by the U.S. State Department. The United States has supported Mexico’s justice reforms part of the $3 billion Mérida Initiative, a 12-year-old binational partnership aimed at strengthening security and the rule of law in Mexico, and combating drug trafficking organizations.

During a mid-morning break in the San Francisco burglary trial, the judge, Gerardo Sandoval, invited the visitors for a chat in his chambers. Hernández and the other professors filed through a door at the rear of the courtroom and crowded around the judge in his temporary office. They peppered him with questions about the American system and how it resembled their own — or differed from it: Is the defendant required to testify? What happens when a lawyer raises objections? Who pays expert witnesses?

A young defense attorney named Edgar Martínez said he was impressed to see the American lawyers get up and walk around the courtroom and use visual aids in their closing arguments.

“I wish we could use these techniques in Mexico,” Martínez said. “Mexican courtrooms are rigid. We’re supposed to stay at our desks and speak into microphones, so the proceedings can be recorded. I’ve asked judges to let me stand up, and I’ve asked if I can show slides, but they won’t permit it.”

Sandoval counseled patience. He reminded Martínez that the U.S. legal system of a century ago (or even half that in some southern states) would be unrecognizable today. And it keeps evolving.

“You’re just in the first stages of a new system,” he said. “In time, Mexico will find the right balance.”

It’s not the first time Sandoval has met with Mexican lawyers in the California training program. Before he returned to the bench to resume the burglary case, he said this was his way of giving back to the country where his parents were born — to help Mexico build a justice system that can withstand the corrupting influence of cartels.

“Sunshine is the best disinfectant,” Sandoval said. “So it can only help things there, with the terrible violence they have and the drug trafficking they have, to have greater transparency and bring greater confidence in the judicial system.”

And, Sandoval added, it's in the best interest of the United States if neighboring Mexico can become a more just and secure country. In the long run, it could even reduce the pressure for Mexicans to migrate north.