As a boy growing up in a slum in Cali, one of the world's most violent cities, Andres Felipe Gonzalez knew his chances of a life without crime or becoming a victim of crime were slim.
"I remember hooded men would enter the neighborhood. We'd switch off the lights and hide under a table," said Mr. Gonzalez, who lives in southwest Cali's Las Minas Comuna 18 neighborhood.
"In the culture I grew up in, the best man is the one who has the biggest gun. The bigger the gun, the more respect you have," said Gonzalez, known locally as Fares.
But against the odds, Fares did not end up joining a gang or resorting to violence.
Fares, now 27, is part of a multi-million-dollar initiative that aims to keep young men off the streets and away from gangs in Colombia's third largest city by offering them other options.
Since starting in 2016, the project, called "Integrated Approach to Gangs – Youth Without Borders" (TIP) and funded by Cali city hall, has worked with about 1,400 people and 73 gangs in slum areas, including young men and women at risk of being recruited by gangs.
With a murder rate of 51 per 100,000 people in 2017, Cali ranks as one of the world's most dangerous cities. Much of the violence is drug or gang-related, and perpetrated by young men.
Across Latin America, a region where nearly 1 in every 4 of the world's murders takes place, cities seeking to cope better with modern-day pressures are looking beyond risks from natural hazards like floods, and tackling social stresses, too.
In Cali, preventing gang violence is part of the city's five-pronged resilience strategy, drawn up under its membership of the 100 Resilient Cities network, backed by The Rockefeller Foundation. The plan also covers action on climate change, education, transport, and governance.
"We understand resilience as overcoming both shocks and tensions," said Juan Camilo Cock, deputy secretary of the Areas of Inclusion and Opportunities program at Cali mayoral office.
Tensions are ongoing issues that affect people's livelihoods, he noted. "When we did the diagnostic for resilience in Cali, one of the main issues that came out was violence," he told the Thomson Reuters Foundation.
Cali's homicide rate has decreased since 2012 when 80 per 100,000 people were murdered in the city, he noted.
"It's come down 30 percent in five years – but we know we need to go further," Mr. Cock said.
The TIP program works with neighborhood street gangs, typically comprising about 20 teenagers who are small-time drug dealers catering to local demand and who fight turf wars.
"Once violence becomes normalized in a community, kids as they grow up don't see other options for their future. What they do see are opportunities within criminal life," Cock said.
"Then it becomes a life choice, and we know that we need to break that cycle."
Robert Muggah, research director of the Igarape Institute, a Brazil-based think tank, said Latin American governments trying to combat gang violence had largely used heavy-handed responses.
That involves security forces raiding crime-ridden slums as seen in Mexico, Colombia, Brazil, and parts of Central America.
But in recent decades, new methods of tackling violence have gained currency, with Colombia leading the way, Mr. Muggah said.
"It's this idea that we shouldn't only rely on the punitive and policing side of the equation, but we need to emphasize the social prevention side of things," he said.
The new approach focuses on community policing, as well as supporting and working with community leaders, and has also been introduced in countries such as Jamaica, Brazil, and Honduras.
It draws on the belief that communities themselves have the ability to regulate and moderate delinquent behavior, while reinforcing positive behavior that can be extremely effective in keeping youth away from gangs, Muggah said.
Colombia caught onto this early and "understood that resilience had to be built from the bottom up," he explained.
Community as a 'protective shield'
This bottom-up approach is being deployed in Las Minas and other poor areas of Cali. Most are informal settlements of brick shacks, home to people uprooted by Colombia's internal conflict.
In Las Minas, Fares leads a tight-knit group of six men aged 16 to 27 who belong to the TIP program, which is implemented by Cali's University of Valle and local police authorities.
Together, the young men rap, write songs, make music videos, paint, play football, and fly kites as an alternative to gang life.
"The group is like a protective shield. It's about getting out of a negative environment," Fares said.
Often bored, jobless, or school dropouts, teenagers are typically first introduced to gang life while loitering on street corners smoking marijuana, where they make easy prey.
Gangs offer jobs earning up to $100 a day selling drugs, as well as a sense of belonging, friendship, and protection that too often the state, police, and families have failed to provide, Fares said.
"Gangs give you work – and you become emotionally tied to them," he said.
With the support of police and psychologists, Fares and his friends have turned an abandoned school into a small library and community center, cleared garbage dumps, and painted a playground.
They also run a kids' homework club and family cinema night.
"If I wasn't part of the program, I'd be bumming around on the street. This keeps me distracted," said 16-year-old Camilo.
'Invisible borders' divide neighborhoods
Gangs divide communities – both physically and socially – making them less able to withstand violence.
Neighborhoods are often carved up along gang territory lines known as "invisible borders."
"There's a culture of silence," Cock said. "People start losing trust in each other, and in the state, and that is the breakdown of social fabric."
In some slums, "invisible borders" mean children cannot go to a certain school or library because it is too risky to cross another gang's area, and even drop out of education.
"For the municipality, for the state, it becomes a real challenge," Cock said. "That's why engaging with gang members is important, to start bringing down levels of violence, to start replacing the order of gangs by the order of the state."
Authorities also work with community youth leaders like Fares to decide how to best to improve areas and make them safer, by installing lighting for example.
"We don't want safe neighborhoods because of a big police presence," Cock said. "We want safer neighborhoods because people aren't killing each other."
This story was reported by the Thomson Reuters Foundation.