The psychologist said, “I need you to be calm.”

“They will see me” — terror in her voice.

“They won’t see anything. They cannot see you,” he reassured her, showing her how to breathe deeply if she went mute with fear.

She slipped on what looked like a black burqa, covering her from head to toe, along with rubber boots and black gloves. At the courthouse, she stepped inside a wooden mobile armoire with a one-way window, through which she could see out but no one could see in, and she was wheeled into court.

When she glimpsed the two men charged with the murder, anger welled up in her. She calmly laid out what she had seen, her voice distorted by a machine.

She had witnessed three murders, but this was the first time she had told anyone. Afterward, in the car, she beamed. “I feel liberated!”

“People want justice, that’s all,” Mr. López said. Three weeks later, both the accused were found guilty of murder.

In the area where Andrea was killed, no one has been murdered in two years, according to Mr. Pacheco. He estimated that the number of gang members in Rivera Hernández dropped 25 percent in three years. “We are taking away the gang’s lifeblood: new recruits,” he said.

All this is not to say that the place is anywhere near safe. Children continue to be murdered: Last year 570 were killed in a country with a population smaller than New York City’s. One afternoon several months ago, a Mara Salvatrucha gangster was caught by the police in Rivera Hernández with a hacked up body in the front basket of his bicycle, casually on his way to dispose of it.