When Steve Mbugua uprooted more than 500 coffee trees on his half-acre farm in Nyeri county, Kenya eight years ago, his neighbors thought he was making a mistake.
The farmer replaced them with 500 seedlings of Hass avocados – for which there is now huge export demand – and today makes nearly $4,000 a year from his harvest.
That is nearly 10 times what he earned from coffee.
"I knew I would make money," he said, particularly as warmer conditions and worsening drought make it harder to grow coffee in some parts of Kenya where it earlier thrived.
Unlike coffee trees, Mr. Mbugua said, avocado trees require little maintenance, and their fruit is a good earner. Coffee prices, on the other hand, have gone the wrong way: The price on global markets dropped from about $2.80 a pound in 2011 to about $1.12 today.
And with coffee harvests also varying in the face of harsher and less predictable weather, thousands of coffee farmers are switching to avocados, said Joseph Ntere Njau, former chief of nearby Meru county, one of Kenya's main avocado-growing areas.
Avocados' popularity has soared around the world in recent years, driven by increased awareness of their health benefits, experts say.
In the United States, for instance, per capita consumption of avocado doubled in the decade to 2006, reaching 3.5 pounds, and doubled again to 7.1 pounds in 2016, according to data from the US Department of Agriculture.
Kenyan exports of the fruit have climbed from nearly 39,000 tons in 2015 to about 47,000 tons in 2016, worth around $52 million, said James Weru, marketing manager at Fair Trade Enterprises Limited, a fresh produce exporter.
Kenya is now Africa's second-largest producer of avocados – behind South Africa, Mr. Weru said – with 7,500 hectares under cultivation. Seventy percent of growers are small-scale farmers.
About one-fifth of the annual harvest is exported, he said, and goes mainly to markets in Europe and the Middle East.
"[That is] due to the high demand ... as avocado is considered to be a very nutritive fruit and has a lot of health benefits," he told the Thomson Reuters Foundation.
Avocado farmer Mbugua said Kenya has a good climate for the crop, adding that the Hass varietal that he and many grow is tolerant of different rainfall conditions and easy to propagate.
It also requires little labor, is resistant to pests and disease, and has a long growing season, he said.
With demand continuing to climb, Weru's company said it needs another 10,000 farmers to grow Hass avocados for export.
But some caution against rushing to uproot coffee trees.
Okisegere Ojepat, who heads the Fresh Produce Consortium of Kenya, a trade association representing growers and exporters in the horticulture industry, noted that avocado trees take three years to fruit, and a further two to reach maturity.
"So what will farmers be doing as they wait?" he said. "I cannot advocate cutting down a tree to plant another tree."
And, he added, coffee demand would likely revive as the government and the private sector have been working to promote Kenyan coffee abroad and improve governance at cooperatives.
Mr. Ojepat also warned against rushing from one perishable commodity that is seemingly in decline to another that looks to be booming. Such markets, he said, can prove unpredictable.
"Often, once farmers realize that a certain commodity is fetching a premium, a majority tend to also experiment," he said. That can flood the market and lower prices.
At his two-acre farm in Mugambone village in Meru, retired army general Gideon Gitonga is one of more than 300 avocado farmers in his area alone.
His trees, planted in regimental rows, have far outperformed coffee: Just seven avocado trees generated about as much income as 500 coffee trees, he said, making the decision to switch to Hass and Fuerte avocados easy.
One of his mature Hass trees, he said, produces up to 1,200 fruits in a season, while a Fuerte tree gives 2,000 to 3,000. He feeds any waste to his livestock.
This season he expects to earn about $1,000 from the fruit. He also keeps bees, which provide honey and help boost avocado production by pollinating the trees.
Avocados are seen as a healthy food not only abroad, said Mr. Gitonga, but increasingly in Kenya, too – with his family among many who enjoy the rich taste.
And high demand for avocados has helped farmers like him who once earned low price for much of their produce, he said.
Gitonga said he no longer has sleepless nights worrying about cash flow, while the fact that buyers come to him means he saves on transport.
"And [they] pay me promptly – as compared to the long wait I was compelled to [deal with] when I was farming coffee," he said. "Avocado farming is the best thing that ever happened to me."
This story was reported by the Thomson Reuters Foundation.