As the sun sinks just below the horizon, Jorge Sandoval strolls across a dusty street.

He's a small man in his 50s, who runs volunteer patrols. The neighborhood is poor. The houses are cobbled together out of leftover wood and pieces of metal.

Two years ago, Sandoval says, these streets used to be desolate and controlled by gangs.

"They would shoot at each other at all hours," Sandoval says. "Suddenly you'd find someone injured, someone innocent, because they just didn't care."

The Dimitrov neighborhood in the capital of Nicaragua used to be one of the most dangerous in the country. It was so dangerous that its 10 or so square blocks accounted for 20 percent of all the crime of Managua, a city of 1.2 million people.

But on that day, as I walk the narrow residential streets with Sandoval, music pours out of open windows and neighbors sit on stoops. Sandoval says people in the neighborhood have come to an understanding.

"All that shooting, all those deaths, they were part of the war we lived," he says. "Now, why should we be shooting each other?"

We stop in the middle of the street and see something surprising — children, running out of their homes to play in the streets.

A Region Engulfed By Bloodshed

This kind of tranquility is not something you'd see in the capital cities of El Salvador, Honduras, Guatemala or Belize, because over the past decade, Central America has been engulfed by bloodshed, becoming one of the most dangerous regions in the world.

Nicaragua, the poorest of the bunch and with just as bloody a history, is one of the safest countries in the hemisphere. Analysts say it has to do with its approach to fighting crime.

While Nicaragua's neighbors have embraced so-called "mano dura" or iron fist policies, Nicaragua has taken a softer approach.

The Nicaraguan police, for example, pacified the Dimitrov neighborhood by having the community patrol itself and by having police officers mediate talks between gang members often after soccer games.

El Salvador and Honduras legislated "mano dura" policies against youth crimes. Guatemala and Belize followed suit but in a more ad-hoc manner.

A February 2014 report by the Congressional Research Center finds in that early period, those countries incarcerated thousands of young people, sometimes just because of their tattoos. The report finds that between 2004 and 2005, El Salvador alone sent up to 14,000 young people to jail. The unintended consequence was that prison gave gangs the time and peace to organize and recruit.

Pedro Argueta, the police commissioner in charge of youth issues, says that right now Nicaragua has just 70 juveniles in jail.

He says the country's bloody civil war taught them that violence only begets more violence.

"The repression that we had during the 70s, taught us a lesson," he says. "That when there is repression, there is a reaction."

Elvira Cuadra, who has studied Nicaragua's police force for decades, says that's a romanticized version of events.

She says that many of these policies were actually crafted as political tools.

"Every government agency had a specific role and their primary objective was to defend the revolution," she says.

It's a system that was developed in the '70s, when Nicaraguans were preparing for war against the dictatorship. Some were instructed to develop emergency treatment centers at their homes, while others were given small, but important tasks like collecting water. After the Sandinista victory in '79, the Cuban model took hold and community organizers became government spies, reporting any counter-revolutionary actions to the government's security agency.

The Sandinistas came back into power in 2007 and a2009 report from the Managua-based Center For Political Studies and Analysis found that by that point the government had 500,288 community volunteers. This in a country with a population of a little more than 6 million.

Cuadra and other human rights groups have expressed concern that the police and even the community volunteers have begun to take on those security roles again. Cuadra says that's bound to erode the trust the community has developed with police.

School Instead Of Prison

But despite those criticisms, Nicaragua's approach seems to be working. The country's homicide rate is a fraction of what it is in Honduras and while children from El Salvador and Guatemala are streaming north, Nicaragua is keeping its youth at home.

On the hills that surround Managua is Nicaragua's newest youth training center. It's a huge campus that's part of a program that sends kids to school instead of prison.

In one of the classrooms, I find Jonathan Ruiz. He's 16 with a tattoo that starts at his hand and snakes its way up his inner arm. He's learning how to be a barber, so he's styling a classmate's hair.

He says he used to be a gangbanger, but a few weeks into the program, he gave up his gun.

I ask him if he worries about going back to his neighborhood and coming face-to-face with his old friends and rivals.

"Yeah," he says. "But I always go back to my neighborhood. And they view us differently now. They don't view us as delinquents."

Copyright 2016 NPR. To see more, visit http://www.npr.org/.