For as long as Luiza Maria Nascimento Elias can remember breathing, she has wanted to move away from Rocinha.
When she gazed out onto the crumbling, narrow streets winding their way up the back of Two Brothers mountain and at the shacks stacked precariously atop each other like children's building blocks, all she saw was poverty and neglect.
Three years ago, Elias, a 32-year-old Brazilian event organizer, finally got her wish and moved with her bank-manager husband and their son from the Rocinha favela , or slum, into a nice apartment in the upscale Flamengo area of this city.
That, she said, was a big mistake.
"I was scared all the time," she said of Flamengo. "I was afraid on the elevator. I was afraid in my car. I was afraid in my apartment. There was crime everywhere. People were always getting robbed."
So the couple moved back to the largest slum in all of Latin America, a place where drug traffickers reign, health care and education are inadequate, and the average salary is $130 a month.
Elias and her husband are part of a small but growing middle class that has found that, ironically, life in the impoverished favelas is in many ways better than that in the city's more affluent Flamengo, Ipanema and Copacabana neighborhoods that they border.
These people include store owners, professionals, retirees and owners of second homes who want the beautiful hilltop vistas. From the outside, many of their homes resemble the hodgepodge of unfinished brick construction that has replaced the old wooden and tin shanties and now typifies favela structures.
The homes, however, have well-appointed rooms, parquet floors, well-stocked bars, rooftop decks or verandas with sweeping ocean vistas, modern appliances, imported cars, and sometimes swimming pools and maids. Satellite dishes have begun to sprout like mushrooms from rooftops.
On the one hand, the emergence of middle-class dwellings in these squatter communities, which for decades have housed many of the nation's urban poor, signals a gradual coming of age for neighborhoods historically synonymous with misery. It is a testament to the ingenuity and perseverance of thousands of Brazilians who have fashioned some dignity and decency out of still-harsh living conditions.
On the other hand, it highlights the incongruities in Brazil's urban centers, which have caused people who could live elsewhere to feel more comfortable residing with pistol-packing teen-age drug lords and thousands of poor, illegal squatters who buy, sell and remodel homes that are not theirs in communities that the city does not officially recognize.
What attracts many outsiders to the favelas and keeps most longtime residents inside them are two issues that plague all of urban Brazil, particularly Rio: prices and crime.
Homes in the favelas can be had for a fraction of the costs elsewhere, even though land values there have begun to climb dramatically as more people have begun buying and building. The problem is that the vast majority of new homes are illegal.
"None of the land belongs to anybody at all," said Bob Nadkarni, 56, a British television producer who moved onto the mountainside that is the Morro da Novacintra favela 13 years ago and eventually married his next-door neighbor. "Legally, you have the same status as squatters."
Residents therefore do not pay taxes, but that benefit is outweighed by a larger set of problems. Because they are illegal communities, they lack city services. Roads and sidewalks are a patchwork of uneven construction. Open sewers run throughout, and many residents lack running water.
Without land titles, residents cannot seek legal recourse to property disputes, and landlords cannot evict delinquent tenants.
To make sense of it all, residents years ago began forming volunteer groups that act as a clearinghouse for community problems, securing services like community centers, health clinics and even cooking schools.
"Probably our No. 1 issue here is land titles," said Tominho Barros, secretary of the Vidigal Dwellers Assn. representing the Vidigal favela that borders the Leblon beach colony.
A person who wants to move to a favela must be approved by the local dwellers association. Buyers then can purchase a building, completing the transaction by transferring electrical service to the new owner's name.
When the Eliases moved back to Rocinha, which for decades existed in the same legal limbo as other favelas , they bought a home and then spent tens of thousands of dollars putting in hardwood floors, redesigning the veranda and adding new closets, a brick bar and an outdoor barbecue pit.
Fortunately for them, last year the city recognized Rocinha as a legal neighborhood in which people can hold title to their property and apply for badly needed city services.
"In the favelas , people leave their doors unlocked, while we live almost in virtual prisons," said Christina de Souza, a housewife from Barra da Tijuca, a middle-class beach enclave on Rio's southern outskirts.
While some favelas are violent, crime-ridden places like the slums of the United States, others are quite safe.
"I feel completely safe anywhere in Vidigal," said Angela de Castro, 42, a newspaper sportswriter who lives in the 50,000-resident favela with her mother and father in a bungalow surrounded by flowers and exotic plants. "It's a small place, and everybody knows each other. In other places, you don't know your neighborhood."
Next-door neighbor Manuel da Cruz Ferreira, 67, a retired government worker and contractor who lives in a three-story home with three balconies and a pool, says he strolls his neighborhood without a worry. Nadkarni hasn't had a lock on his door in Morro da Novacintra for seven years. "Every friend I have living down below has been robbed at one time or another."
In Rocinha, home to 250,000 residents, police scratch their heads when asked to recall a case of a robbery, burglary or theft in the past year.
"The drug dealers scold (anybody who commits a crime) pretty thoroughly," said Deputy Police Chief Jose Carlos, visiting with his officers in a concrete shed that is the Rocinha substation. "Well, OK, they kill them. That's why they don't have any crime."
In nearly every favela , drug traffickers rule. Nothing moves without their knowledge or tacit consent. The drug dealers dangerous "profession" means they rarely live past the age of 25 and accounts for the favelas ' high murder tally.
In some favelas, they are cruel, vicious criminals who have brought with them a cult of violence that permeates the communities in which they reside.
In others, the drug barons enforce a protective code, meting out a swift, strict justice that provides a sense of order upon which many residents, including the middle class, have come to rely, however grudgingly.
"My wife wishes they weren't here, and I understand her point," said Jamine Mendonca Merence, a 38-year-old contractor who lives with his family of four in a narrow, four-story home in Vidigal. "But I've lived in favelas that didn't have drug traffickers, and this is much better."
In Vidigal, as in other favelas , the drug traffickers' doctrine makes crimes against other residents, particularly women, unthinkable, and that extends to nearby areas where crimes that might mar the neighborhood's reputation or otherwise upset the status quo are punished severely.
For instance, when three youngsters assaulted a bus driver whose route serves the Morro Dona Marta favela in Rio's Botafoga district earlier this year, drug traffickers shot them each in one hand and left them for police.
Favela residents speak nonchalantly about fellow residents whom traffickers have told to leave for their misdeeds, or who suddenly disappeared after committing a crime against a neighbor.
"In all the time I've been here, I can think of only one person who broke into a house and stole something, and he lived for about 10 minutes after that," Nadkarni said.
When residents have problems, they go to the drug traffickers, not the police. Earlier this year the father of soccer star and Jacarezinho favela native Romario dos Santos Ferreira, now leading the Brazilian team in the World Cup, was kidnaped in Rio. Instead of seeking help from police, the family went straight to a major drug trafficker. His father was released immediately.
The emergence in recent decades of drug dealers as the protectors of the community reflects the general service vacuum in Brazil, particularly for poor people, says anthropologist Alba Zaluar.
"The police don't play the role that they should play," said Zaluar, author of "Condominium of the Devil," a book released last month that examines the culture of a particularly notorious favela ironically named Cidade de Deus, or God's City. "They don't protect the people in the favelas , because the people of the favelas are not considered citizens. If anything, they are afraid of being killed by the police.
"That's true for many other aspects of life. So people have come together to fashion their own systems. Actually, they're sort of caught between a rock and a hard place, so they've created a special sort of community. They are closer, more tightly bound together.
"It's much different from the more sterile communities down below where people hardly know their neighbors. So, I understand why that woman decided to move back to Rocinha."