Brazilian voters on Sunday decisively rejected a proposal to outlaw the sale of firearms and ammunition following an aggressive campaign by opponents who argued it would leave citizens defenseless against armed criminals.

With more than 92 percent of the ballots counted, 64 percent of Brazilian voters opposed the ban, which its backers hoped would help Brazil shed its label as one of the world's most dangerous countries. More people are killed by firearms in Brazil than anywhere else; about 36,000 gun fatalities were reported by the government last year.

The referendum marked the first time a country has put a gun ban to a nationwide vote. The defeat disheartened gun control proponents, who had argued that powerful lobbyists for the international gun industry unfairly influenced government policy. They had also argued that a popular vote could have allowed an anti-gun majority to set a precedent for other countries.

"This closes the issue now, but maybe the next generation will be able to have this discussion again," said Rubens Cesar Fernandes, director of Viva Rio, a civic group that helped coordinate the anti-gun campaign. "I hope the whole world will be able to deal with this again."

In the weeks before the election, supporters and opponents launched extensive media campaigns to try to sway opinion among the 122 million people expected to cast ballots. Voting was mandatory for voting-age Brazilians and optional for those over 70.

Existing laws in Brazil require gun buyers to be at least 25, not have a criminal record and pass psychological and gun-handling tests. The ban would have prohibited the sale of all guns and ammunition to anyone except police, security personnel and licensed target shooters, but would have allowed those who already legally owned firearms to keep them.

"We already have very tight gun control laws, and those laws only apply to honest people," said Leonardo Arruda, who coordinated a campaign against the ban for Brazil's National Association of Firearms Owners and Dealers. "The ban would only empower criminals, who would continue to get their firearms through illegal trafficking."

Some of the advertisements posted by opponents included images of international personalities associated with struggles for freedom -- such as South Africa's Nelson Mandela -- in an effort to convince voters that a ban would strip them of the liberties such people fought to protect. Mandela's lawyers wrote to the pro-gun group, Front for Legitimate Defense, to ask that his image be removed from its posters.

Proponents of the ban appeared to enjoy strong public support early in the campaign, with several opinion polls in September showing more than 70 percent of respondents backing the measure. President Luiz Inacio Lula da Silva joined 10 Nobel Prize recipients and numerous artists and entertainers in vocally supporting the ban in recent weeks.

Lula and his wife voted for the ban Sunday in their home town of Sao Bernardo do Campo.

Gun control advocates, however, said Lula's support might have indirectly hurt their cause. Fernandes said many Brazilians might have opposed the measure as a form of protest against Lula's government, which has been mired in a corruption scandal since May.

"We started with a lot of support, but we lost so much ground that in the last 10 days we decided we had to switch from a media campaign driven by volunteers to one organized by a professional company," Fernandes said. "So we changed coaches during the game, while the opposition had a very clear strategy from the beginning. They convinced people that a ban wouldn't stop the violence, and that voting 'no' was a vote against the government, which is a fallacy."