(CNN) -- For whoever has seen the 2002 movie "City of God" -- based on real stories set in the eponymous slum in Brazil's Rio de Janeiro -- a favela can be a scary place, plagued by violent crime.
The Pousada Favelinha, perched atop the Pereira da Silva favela, offers spectacular views of Rio de Janeiro.
The unpretentious Pousada Favelinha, a modest guest house and hostel located at the top of Rio de Janeiro's favela Pereira da Silva, is one notable exception to the city's criminal reputation.
Originally inaugurated in January 2005 by a Brazilian woman and her German husband, it is now run solely by its "carioca" (Rio-native) owner, Andreia da Silva Martins, whose family is both at home and on friendly terms with everyone in the neighborhood -- as well as the police.
The little "Pereirão," a favela that a modest few thousand call home, was just as dangerous as any other until one fine spring day in 1999, when the local police cracked down on the whole favela and killed all its drug dealers, the Pousada Favelinha claims on its Web site.
Since then, the "morro" (hill) has cleaned up the crime, with a police post permanently located at the top entrance of the favela in Santa Teresa, while the bottom entrance leads out to a gentrified neighborhood in Rio's Zona Sud.
During the five days and nights that I stayed at the Favelinha, safety in and around the favela was never an issue. I saw no automatic rifles, and residents greeted me as I passed them in the narrow alleys, while dogs and cats lounged on cement platforms and rooftops.
One girl even walked me to the door of the hostel upon my first arrival, and showed me where she lived in case I needed any help later.
"They're proud to live in a favela that hosts visitors from all over the world," says Carlos, who welcomed me inside. Indeed, it's in everybody's interest to keep the neighborhood safe and friendly.
Meanwhile, I was constantly admiring the extraordinary view of the city from atop the hill, as were the other guests -- predominantly round-the-world twentysomething backpackers from Western Europe and Australia -- during those hot summer days of Carnaval 2009.
And as our leisurely breakfasts and evening brought together both the dorm-room dwellers and the private-room couples around balcony chats, we quickly developed a natural complicity -- not only of those who dared to bunk in a favela, but of those who climbed the steep uphill trek at least once a day.
In recent years, "slum tourism" -- seeking out the shantytowns of developing nations for a more authentic holiday experience -- in Brazil has gained in popularity, and a handful of other establishments open to foreign patronage (if not community volunteers) have sprung up in peaceful favelas around the country.
Among the most prominent is The Maze, a more upscale bed & breakfast -- which also hosts jazz gigs, original artwork for sale, and even the occasional film shoot -- inaugurated in Rio de Janeiro's Tavares Bastos favela in late 2005 by the Brit Bob Nadkarni and his Brazilian wife.
While middle-class Brazilians tend to shun the shantytowns as being filthy and violent, foreigners who are fascinated by them and locals who are familiar with them are making the effort to break down the barriers and open up shop.
Thanks to the interest of adventurous tourists, such initiatives are proving both economically profitable and culturally enriching.