Colombia's Medellin once had a bad reputation -- so bad, that some locals darkly nicknamed it "machine gun city."
The hometown of infamous drug lord Pablo Escobar became a hotbed of crime in the 1990s and early 2000s, plagued by thousands of murders. Its sprawling suburbs were particularly dangerous, cut off from the wealthier city center by steep hills.
Over the past decade, however, city authorities have found a way to connect these neighborhoods with the rest of the city, and the world -- by building libraries.
Related: Detroit's tiny homes offer a big chance for struggling residents
"The city has always developed more towards the city center," said Daniel Felipe Zapata Hincapié, a Medellin city official responsible for Libraries, Reading and Heritage. "Historically we didn't put much care into the outskirts... the rural territories."
But since the first of 10 "library parks" was unveiled in 2008, they have become anchors for the community, Hincapié said. Residents have taken ownership of the libraries and are shaping their communities around them.
Related: Cities realize they must fix the sorry state of buses
The libraries aren't just for reading and borrowing books -- their impressive architecture houses exhibition halls, classrooms and auditoriums that host reading lessons for children and adults, as well as workshops on tech and robotics. The sprawling parks that surround them provide respite from the urban sprawl and a connection to nature.
"More than having well equipped, architecturally beautiful buildings, what we prioritized is to have symbols," said Hincapié, speaking to CNN at the Fernando Botero library in the Medellin neighborhood of San Cristobal.
"The library parks are a symbol for the city... of transformation, innovation and inclusion," he added. "There's room for everybody here."
Other initiatives -- like a cable car system launched in 2004 -- have also helped connect poorer neighborhoods with richer ones in the valley. Fewer people are left out of the city's development, and crime rates have gone down.
Related: How Seoul is using technology to avoid traffic hell
The libraries have also given Medellin's citizens a renewed appreciation of Colombia's literary traditions that produced writers such as Gabriel Garcia Marquez, winner of the Nobel Prize for Literature in 1982.
Events like the annual Medellin Book and Culture Festival have further strengthened the link between reading, education and social development.
"When someone reads a book, you're never again the same person," said Diego Aristabal, the festival's director. "You begin to understand each other, and understanding other people is something fundamental to the process of reading and for the transformation of the city."
The library parks are creating a safer and more democratic Medellin for future generations, according to Hincapié.
"This library has always been about the democratization of knowledge... especially for young people to have a place to grow," he said. "Here they only find freedom, knowledge, they find a safe space."