In thousands of fields across Nigeria rows of gold-yellow corn kernels are stippled with mold. The fungus is often invisible to the human eye, but even when its tendrils are visible as a greenish-black growth it is not considered a nuisance. Instead, many farmers are pleased to learn it has taken up residence because it shields their crops against a substance that threatens human health.

For the past few years a growing cadre of farmers in west Africa have been deliberately infecting their corn with a specific strain of the mold Aspergillus flavus as a means of fending off another strain of the fungus. The other, unwelcome strain of A. flavus produces a poison called aflatoxin that can sicken or kill people who consume it, especially over many years.

At acute levels, aflatoxins can poison people or animals, killing them outright. The substance has also been linked to stunting and immune suppression in children who eat a lot of it. In addition, aflatoxin is estimated to cause around 90,000 cases of liver cancer each year. The fungus that produces aflatoxin grows on a variety of crops including corn, peanuts and cotton.

The threat from aflatoxin is not new or limited to Africa but the toxin disproportionately affects people in poorer countries with less rigorous crop testing. How often such contaminated foods are eaten also mediates their risk. “In Africa, in maize-consuming parts, they eat aflatoxin seven days a week, two times a day from the time they are weaned. And they don’t eat a whole lot of everything else, so the exposure is so much more acute,” says plant pathologist Kitty Cardwell, who oversees funding for several programs at the U.S. Department of Agriculture’s National Institute of Food and Agriculture.

Although the U.S. and Europe have strong regulations in place to restrict how much of the toxin can be present in food, the problem has been persistent in developing countries where there are rarely tests for aflatoxin at the market (although there are rigorous tests for crops being exported internationally). But even when chemical tests for aflatoxin are present at some markets in Africa, the aflatoxin-laden crops may not be discarded. Instead, farmers will sometimes bring home the rejected crops and eat them with their families or sell the crops at a discount to those with lower incomes who need the food.

There is no easy way to block aflatoxin. The fungus that produces aflatoxin naturally grows in the soil—and once there it is almost impossible to remove. Crops like corn and groundnuts are more susceptible to aflatoxin-producing mold when their immune systems are weakened by conditions like high temperature and drought stress. The mold’s growth can be halted by carefully drying the crop and protecting it from moisture and insects during storage. But taking such measures can be difficult, especially in humid climates where rain is common. That’s why farmers in Africa have begun lacing crops with a benign cousin of the toxic A. flavus—a biocontrol approach that is already established at many farms in Arizona and Texas.

Once the good mold has taken hold in cropland it outcompetes the problematic mold, starving it of the resources it would need to survive and thrive. Biocontrol techniques like this have been in use in the U.S. for more than a decade. But even when such an approach is accepted in the U.S. that does not automatically translate to being able to use it in other countries.

In Nigeria researchers tested hundreds of crop samples hosting thousands of samples of Aspergillus to try to identify a local strain of good A. flavus that was up to the task of keeping the bad fungus at bay. “It took us six years to get the first product in Nigeria to the field trial level and another five years to get full registration status from regulators,” explained plant pathologist Ranajit Bandyopadhyay via e-mail. Bandyopadhyay is with the International Institute of Tropical Agriculture (IITA), the group that is spearheading the fungus-fighting initiative in sub-Saharan Africa. Along the way the group’s research has been partly supported by the German government, the University of Ibadan in Nigeria and the USDA, among other institutions. Last year the research group managed to set up a manufacturing plant in the country that has finally been able to help meet the massive need for these products. The facility, funded by the Bill and Melinda Gates Foundation, can produce five tons of the mold each hour—enough to blanket more than 1250 acres of crops. “The manufacturing process is first of its kind in the world,” Bandyopadhyay wrote. “For the first time, a promising technology is within the reach of farmers,” he says.

But the technology is still slow to catch on. Only about 24,500 acres were treated in Africa in 2014 and nearly 100,000 acres are projected to be treated this year across Nigeria, Senegal and Kenya collectively, Bandyopadhyay says. (To date, no independent verification of the nonprofit’s figures are available.) That is just a tiny fraction of the farmland in Africa—Nigeria alone has some 10.5 million acres of corn, for example—yet its backers hope this number will grow. The main obstacle is not that people are wary of purposefully putting fungus on their crops. Rather, it’s the cost of buying the fungus to apply, Bandyopadhyay says.

Each country is handling the technology and its financing differently but the principle of how the technology works is about the same. In Nigeria, for example, farmers simply hand-toss the product —dead sorghum grain coated with spores of the “good mold”—on their crops a couple weeks before their crops bloom. In field tests over a four-year period, Bandyopadhyay says, Nigerian farmers were able to reduce aflatoxin contamination on their maize and groundnuts by some 80 to 90 percent using this product, called Aflasafe. His team plans to submit that work to a peer-reviewed journal. Although the farmers in that study were provided the product for free, farmers that are buying the stuff are also turning a profit, according to the IITA. Their figures suggest that in the past couple years, when the product was sold in Nigeria, farmers got up to $5.10 in profit for every dollar they spent on Aflasafe. (Farmers typically need to spend roughly $5 to $8 per acre of corn.)

Part of the reason farmers using Aflasafe are able to make money, however, is that they were included in an aggregation service that would collect their products and bring them to a market where buyers would pay top dollar for the low-aflatoxin product, Cardwell notes. For farmers selling their product on the more informal market, it would be more difficult to turn a profit.

Yet the need for an intervention is great. An estimated 4.5 billion people living in developing countries may be chronically exposed to aflatoxin through their food, according to the U.S. Centers for Disease Control and Prevention. What’s more, from 85 to 100 percent of children in African nations have either detectable levels of aflatoxin in their urine or biomarkers of aflatoxin in their blood. It has also turned up in breast milk samples in Iran, Turkey and Cameroon.

Even with the successes in Nigeria, the benefits of the A. flavus biocontrol program have been slow to trickle into the human food chain. Most of the low-aflatoxin crop is still being purchased by poultry producers to feed to chickens that would otherwise be sickly and stunted in their growth. Organizations that locally source their maize, including Nestlé and the United Nations World Food Programme, are also interested, according to the USDA. One group of people, however, may be eating healthier already: the farmers. Farmers typically hold back some of a harvest to feed to their own families, so if all their crop has less aflatoxin, then their families are now eating healthier, too. “Obviously what we all want is to get the toxin out of the human food supply,” Cardwell notes, “but in order to incentivize farmers to take on additional cost and operations in their field they have to have a market that values that low toxin level.” Jump-starting that market with sales to poultry producers may be a step in the right direction.