Before choosing to become a mango farmer in 2000, Sun Shaohua worked for a coal mine in Huaping county, Yunnan province for 10 years.
The decision meant he had to put more effort into his new career, which was greener but not as immediately profitable.
Sun planted mango trees in 2000 on 9 hectares of mountainside land his family had leased from Demao village decades ago, but he didn't reap a good harvest until 2014. It usually takes about eight years for mango saplings to grow and bear fruit, and coal dust from surrounding mines inhibited their growth.
While waiting for a successful harvest, he funded the plantation's expenses, which included buying fertilizer and hiring workers, with money he made by transporting coal.
Sun and his fellow villagers used to grow corn in the mountains while working for the mines, but the government encouraged them to plant mango trees instead for higher profits and environmental benefits, including soil stabilization.
"The transformation could not be accomplished overnight," Sun said. "Before the mangoes produced profit, we still had to rely on coal."
"But the long wait for fruit was worth it. It was time to embrace a green industry as the pollution from the mines impacted our daily lives. On rainy days, black water from coal mountains flowed nearly everywhere in the village."
A year after Sun reaped his first successful mango harvest, 31 small coal mines in the county were closed under the guidance of the central government, leaving 48 larger ones in operation. By last year, only 13 big coal mines, each capable of producing more than 300,000 metric tons a year, were left, but they were operating at well below that capacity.
Last year, Sun earned more than 200,000 yuan ($30,580) despite the impact of the COVID-19 epidemic.
"I no longer had to work for other people doing irrelevant jobs all year round," he said. "Being a farmer, I can earn much more and rest for nearly half a year."
The local government and coal mine owners jointly invested in transforming mountain coal mines to arable land.
Over the past decade, most of the county's 46,000 coal workers have switched to planting mangoes or other agricultural produce, like peppers.
In 2019, the county produced 480,000 tons of coal, down about 81 percent from 2016, the county government said.
Huaping county had about 8,000 hectares of mountains containing coal mines from the mid-1980s to 2015, accounting for 20 percent of its uninhabited mountains, but mine closures have seen that figure fall to 6.7 percent.
For environmental protection purposes, the local government made a plan to transform its "black" energy-powered economy into a "green" one and began planting trees on the mountains in the 1990s.
The plan was also a response to the central government's campaign to protect the Yangtze River. The county sits near the upper reaches of the Yangtze.
"The county was faced with the challenge of transforming Huaping's pillar industry into a high-quality and sustainable one," said Yu Lijun, Party chief of the county.
He added that in 2018, the county issued a guideline saying it would carry on replacing coal mines with mango farms and develop clean energy and ecotourism as pillar industries.
The local government offered each villager a subsidy of 1,050 yuan a hectare for them to plant mangoes and taught them mango farming skills developed in Sichuan and Hainan provinces for free. Some Communist Party of China members played a leading role by planting the first batch of saplings on the mountains.
Due to longer hours of sunshine in the county, late-maturing mangoes that can sell at a good price-about 4 yuan each-grow well. Last year, 25,200 hectares of mango trees in the county generated 2.28 billion yuan of revenue, the local government said.
As coal production declined sharply, the county shifted to hydro and solar power. In a clean energy industrial park, factories making silicon rods for solar cells have created jobs for villagers.
Efforts to improve the environment have paid off. Mango farmer Wang Daoxiang said water quality has improved.
Wang said that in the past, summer rain would wash the soil from the barren mountains into the river, making it muddy.
"After fetching the water from the river with buckets, villagers had to wait about six hours for the mud and sand in the water to subside before drinking," he said. "As mango trees grew, they stopped soil erosion and made the water clear."
In 2019, about 94 million tons of sand entered the river, down 58 percent from 2005, the county government said. Between 2013 and 2019, the number of fish species in the river nearly doubled to 61.
In October, the Ministry of Ecology and Environment nominated Huaping and 34 other counties and districts as demonstration bases for other places to learn how to transform green mountains into invaluable assets.