The Imperial City which is high in the cool hills of eastern Brazil, the tourist hot spot, is now attracting worldwide attention thanks an innovative scheme to recycle human sewage.
It has fostered a relatively simple idea now gaining traction in other parts of Latin America and as far afield as Spain, as nations struggle with the impact of burgeoning populations compounded by dwindling supplies of fuel and water.
Here bio-digesters, specially designed organic enzymes and bacteria, are used to break down waste water and turn it into an alternative energy sources such as gas.
During three fermentation processes, the bio-digesters are unleashed on human effluent and as they break it down they produce a bio-gas, a mixture of methane and carbon dioxide, which can then be piped into homes for use in heating or cooking.
"In fact this is a greenhouse gas, which is harmful to the atmosphere when it is unleashed, but can be collected to be useful," said Jorge Gaiofato, technical director at the Environmental Institute (OIA), the non-governmental organization behind the scheme.
Today there are more than 80 such bio-digesting ponds in Petropolis, a town some 65 kilometers (40 miles) from Rio de Janeiro on the east coast, which was once the summer residence of the Brazilian emperors in the 19th century.
The results of this 21st century project are exciting a lot of interest. Nicaragua, the Dominican Republic and Haiti have all established similar schemes.
The beauty is that nothing, literally, goes to waste. The mud left over from the bio-digesting process can be used as fertilizer for crops and the remaining water, now cleaned of noxious elements, is emptied back into neighboring rivers.
Gaiofato hopes the scheme will become more widespread in Brazil, where according to official statistics less then half of towns and villages collect their waste water and only 20 percent of it is subsequently treated.
This clean energy is now supplied to five of the city's poorer districts, providing gas for cooking and heating to about 20,000 people.
"The bio-digester recycles and reuses the waste water. Normally treating such waste is the job of the government as there is too much of it. But, the bio-digester is a solution for places where there is no existing network," added Gaiofato.
And the system is cheap. According to the non-government organization the cost of just one bio-digester is three times less expensive than installing traditional water treatment plants.
One bio-digester, which can serve four houses, costs just 1,000 to 1,500 dollars to set up.
If 10 houses use such a system, that produces enough gas for one household to be self-sufficient in gas.
The company Aguas do Imperador, which is charge of the sewerage system in Petropolis, has even installed a bio-digester system in the city's slums.
Two months ago Gean Carlos dos Santos, a 35-year-old teacher, decided to remove his septic tank to install a bio-digester, which he helped to build.
"I had a septic tank, but after taking an ecology course, I decided to change it for a bio-digester. Now we are not polluting the river any more and we get to use bio-gas" for cooking.
He has saved so much on his energy bills, that he is now thinking of using bio-gas to heat his water.
OIA says its project was initially designed to help poor communities deal with a growing sanitation problem and provide them with alternative sources of energy for cooking and heating other than wood or coal.
But as the world wakes up to the problem of global warming and limited fossil fuels, the use of bio-digesters is catching on among more well-off communities.