As Brazil's Government distributes 9 million condoms for free around Rio de Janeiro during the Olympics, a push to encourage safe sex will also help to protect the Amazon rainforest.

All of the condoms to be distributed are produced by a factory in the western Amazonian state of Acre, deep in the rainforest in Xapuri, near Brazil's border with Bolivia.

It is run by the Acre State Government and uses latex gathered from rubber trees by "tappers", also employed in a Government-run program designed to protect their traditional livelihood, foster the sustainable use of the rainforest and deter illegal loggers.

The tappers see themselves as guardians of the rainforest.

On a recent outing, Raimundo Mendes de Barros, a 71-year-old lifelong rubber tapper with a stark white beard, gathered the milky-white latex dripping into metal buckets hooked at the base of countless trees.

"It gives the world a product, the condom, that will be very present there in Rio to fight disease and help with birth control," he said.

Condoms are tested at a plant close to the source of the rubber in Xapuri. ( Reuters: Ricardo Moraes )

For several years, Brazil's Health Ministry has distributed millions of condoms from the factory for free at big events around Brazil, most notably the annual bacchanal of Carnival.

And for decades, tappers like Mr Barros have been on the front line of pushing Brazilian leaders to do more to halt deforestation, which is mostly caused by the illegal clearing of forest for ranching, soy farms and timber extraction.

The fight has sometimes come at a heavy cost as farmers and loggers have sometimes retaliated with hired guns.

Scores of people have been killed over the years trying to protect the forest, most notably the internationally-known environmentalist and rubber tapper Chico Mendes.

His 1988 murder in Xapuri, where the condom factory now stands, helped galvanise the Government to take serious measures to battle deforestation and violence against the Amazon's defenders.

Mr Barros spoke with pride about the fierce fight he and other sustainable rubber tappers waged to maintain their craft.

"Our condom factory, aside from guaranteeing a fair price for the rubber, employs hundreds," he said.

Rio's local Olympic organising committee said about 450,000 of the sustainably-produced condoms will be destined for athletes and staff housed in the Olympic Village.

The rest will be made widely available to the many visitors who will be arriving in the city in just a few weeks, the Health Ministry said.

Reuters