Complexo do Alemao, one of the biggest favelas in Rio de Janeiro, used to be known more for drug trafficking than as a place to watch films.
This was a no-go area for the police for years - a shantytown full of narrow streets and boarded-up houses, where life resembled something out of Fernando Meirelles' award-winning film, City Of God.
Now, astonishingly, the favela is home to CineCarioca - one of the most successful cinemas in Brazil.
Last week, during the Rio Film Festival, dignitaries, soap stars and foreign guests gathered in Alemao for the launch of the festival's "Free Cinema" programme, an initiative to take movies to places they rarely reach.
As they arrived, kids were playing football and street traders were out in force. The only signs of a violent past were the armed troops patrolling the perimeter.
The decision to build a cinema in the heart of Rio's most notorious favela was taken even before last November's "pacification" drive, when the city authorities sent in tanks and expelled the drug dealers.
With the 2014 World Cup and 2016 Olympics on the horizon, the idea of leaving large parts of Rio under the control of gangsters was deemed politically unacceptable.
Sergio Sa Leitao, president of production company RioFilme, proposed the project to the city's mayor, Eduardo Paes, in 2008, when Complexo do Alemao was still firmly in the hands of the traffickers.
With film piracy rife and huge swathes of the population with no access to cinemas, Paes gave it the go-ahead.
To build CineCarioca, Leitao and his team had to negotiate with the traffickers. "It is a pretty delicate situation," he says.
"In non-pacified favelas, it is almost impossible to do anything without having an agreement with drug dealers." The drug traffickers agreed to not interfere.
Ironically, among the films the traffickers themselves were desperate to see were Elite Squad 1 and Elite Squad 2, hard-hitting thrillers about a special police operations unit. The films portray police brutality in slums and were attacked by some for glorifying violence.
Building the cinema is just one part of an ambitious attempt at urban renewal across the favelas. Media centres are also being built to provide local people with access to the internet.
In Alemao today, you cannot help but notice the contrast between the state-of-the-art cinema and media buildings and the decrepit houses.
The initial aim was to open the cinema in March this year. However, after Alemao was cleared of drug bosses, the opening date was brought forward to December last year.
The first film screened at the new cinema was the remake of Tron. Another early coup for the venue was bringing United States star Jesse Eisenberg to the favela for the premiere of Rio.
The cinema is relatively small - it has 93 seats - but it screens about half a dozen shows a day, and its occupancy rate of 55 per cent is among the highest in the country.
Admission costs four reals (just under $3), and the venue's success has driven DVD pirates out of business.
As social commentators point out, traffickers in the favelas were reacting to the demand for drugs from middle-class consumers in more affluent parts of the city, such as Copacabana and Ipanema.
That demand is still there, even if the traffickers are banished for now from Complexo do Alemao.