Biofuels have transformed the small, sleepy town of Sertaozinho in southeast Brazil.
For decades the vast green fields of this region, were one of the world's top sugar producing hubs, catering to increasingly sweet tooth of global consumers.
Then over the last two decades and after many technological advances, sugarcane became more profitable as fuel rather than food.
This green opportunity turned Sertaozinho into a global biofuel powerhouse. The city specialised in every aspect - from planting and harvesting sugarcane to building complex biofuel power plants.
With Chinese-like growth figures, Sertaozinho prospered, to the point where it did not have enough workers to fill all the available jobs.
But in the last three years, low petrol prices in Brazil have plunged the town into its worst crisis in 30 years.
Many of its biofuel factories have closed and jobs are now scarce.
Many cars in Brazil are able to run on either petrol or sugarcane-based ethanol
Brazil is known for having one of the world's most advanced green transport programmes.
It has the world's largest fleet of flex-fuel cars.
In the past decade, much of its economy embraced sugarcane-based ethanol as an energy source.
It is widely available in gas stations across the country. The majority of new cars are able to run on either petrol or sugarcane-based ethanol.
The government played a key role in boosting this alternative.
Ethanol prices are not always competitive against petrol, as they can be affected by seasonal variations and bad harvests.
Ethanol has been officially promoted as a solution to Africa's energy problems
As an incentive for national producers, Brazilian legislators made it mandatory to include ethanol into the petrol mix. A tax was also levied on all fossil fuels.
Brazil's former President Luiz Inacio Lula da Silva promoted biofuels abroad with a strategy informally known as "ethanol diplomacy".
Sertaozinho's wealthy ethanol producers were hailed as "national heroes" by Lula, who proposed ethanol as a solution to Africa's energy problems.
Green but not rosy
But in recent years, as Brazil's economy slowed down, ethanol was one of the hardest hit sectors.
While oil prices were high globally, petrol was kept artificially cheap for consumers in Brazil by the state run oil company Petrobras.
Fossil fuels received incentives, as Brazil's government moved to tackle another issue: inflation.
Paulo Furquim de Azevedo, an Economics professor at Sao Paulo's Insper business school, says Brazil's government did not act deliberately to hurt its ethanol industry, but its economic policy ended up damaging the sector.
"The government was concerned about macroeconomic short-term issues, like the control of inflation. And this led the government to not take care properly of its energy policy", says Azevedo.
"The government did whatever it could to decrease the price of gasoline, which is very important in its inflation index."
Top biofuel producers like Jairo Balbo have started investing in food again
This policy plunged Sertaozinho into its worst crisis in 30 years.
Three out of seven major biofuel plants went bankrupt and now once again the town's producers are having to change tack.
Top biofuel producers like Jairo Balbo have started investing in food again. His group is now putting most of its effort into organic sugar for European markets.
"We adapt what we produce according to how the markets react. There were years when we would use 60% of our sugarcane to produce ethanol and 40% for sugar", says Balbo.
"But now with our sugar project, we have a mix of 65% of sugarcane and the rest for ethanol."
Josival da Silva has not had a steady job for four years despite being a trained welder
Building biofuel-based power plants is also in decline. Ten years ago, firms would contact the local job centre to fight over workers like Josival da Silva.
A trained welder, he has not had a steady job for over four years. Most of his former employers are out of business.
"From 2003 to 2008 my life was very nice", says Silva. "But from 2009 things started getting critical - not just for me but for everyone around me. And things are only getting worse."
"Unemployment is high and we have terrible working conditions."
Oil prices are now coming down making petrol prices cheaper again
But perhaps local producers have more to look forward to in the coming months.
Brazil has overhauled its economic policy again this year, and ethanol is once again a priority.
The mandatory mix of ethanol in petrol has increased - from 25% to 27.5%, and the levy on fossil fuel has been reinstated.
More importantly, subsidies to petrol have been terminated. Government incentives and Brazil's weak currency are helping to keep ethanol more competitive than petrol. And ethanol sales are up again this year.