As she walked home through the twisting, narrow passageways that honeycomb the large hillside slum of Rocinha, Denise do Espirito Santo spotted a young man following her.

She recognised him as a drug dealer, part of an armed gang that holds sway over much of the neighbourhood, but she wasn't afraid.

When she reached home, she said, she waved goodbye to him and stepped through the door she had left unlocked while shopping.

"The dealers watch out for everyone in the neighbourhood 24 hours a day, doing what the police don't," said do Espirito Santo, 43. "People here fear the police and their guns more than they do the dealers."

The inverted realities of Brazil's poorest neighbourhoods have added complexity to the debate about gun control, but later this month every citizen from 18 to 70 will confront a clear, yes-no question: Should the sale of all types of guns and ammunition be banned nationwide for everyone except the police and military?

The October 23 referendum, in which all adults must participate (voting is optional for those over 70), will be the first time any country has taken a proposed gun ban to the national ballot.

Brazil has the highest number of firearms fatalities in the world, with more than 36,000 people shot dead last year, according to government figures.

Initial surveys indicate that most Brazilians favour a ban, hoping it will at least reduce the large number of guns circulating in the country.

Opponents argue that banning guns will do little to stop criminals while making it harder for citizens to defend themselves.