Stooped over a large plastic drum at his farm in southwestern Kenya, Josphat Macharia scoops up a handful of dirt and examines the worms writhing in his grip.
Satisfied, he replaces the worms and covers them with a layer of dry grass.
"These are ready for harvesting," he says.
By that, the father of two means it is time to add water to the container. Doing so causes the earthworms to produce fluid that Mr. Macharia will use to fertilize a plot of cabbages.
Prolonged drought and storm-related flooding have combined to erode fertile soils in rural parts of this East African country.
That has forced farmers like Macharia, who struggle with low yields, to seek cost-efficient alternatives to fertilizers in order to improve the soil and boost crop production.
Rearing worms, known as vermiculture, is a simple solution that sees farmers harvest the nutrients from worm waste, said Jemimah Njuki, an agriculture and environment expert in Nairobi with the International Development Research Centre, a Canadian aid agency.
Farmers spread the waste – a darkish, slimy fluid smelling of rotten eggs – just as they would any synthetic fertilizer.
Producing "worm juice," as it is called on Macharia's farm, can be tedious since it requires checking on the worms to keep them alive. On the other hand, it costs nothing, although the worms require some work each day.
"All I need is a handful of earthworms, water, [and] kitchen – and farm-waste to make organic fertilizer for my farm," said Macharia, a 54-year-old resident of the village of Ndabibi.
To get enough fertilizer for his five-acre plot, Macharia uses five 20-liter drums of worms, and applies the "juice" every couple of days. It is, he said, a perfect solution.
"Even the worms, I collect them from the farm," he said.
His crops have thrived: lines of tomato plants sag with fruits; six-foot high maize plants have a handful of cobs sprouting from their stems; and even the recently sown strawberry plants show promise.
"You can see the crops are very healthy. They have been fed using organic materials," Macharia said, adding that the success he has had means he no longer uses synthetic fertilizers.
Vermiculture spreads across Kenya
Soil degradation is a major problem, experts say. It affects about 180 million people in sub-Saharan Africa alone, costing them $68 billion a year, according to a 2014 report by Agriculture for Impact.
Climate change, desertification, the depletion of mineral nutrients, improper use of fertilizer, and a lack of infrastructure are compounding the problem, the report found.
Vermiculture, on the other hand, boosts soil health, which is paramount for crops to thrive, said Edward Karanja, a researcher at the Nairobi-based International Center for Insect Physiology and Ecology (ICIPE).
Ben Momanyi, a researcher at Jomo Kenyatta University of Agriculture and Technology (JKUAT), said vermiculture was becoming more common in central Kenya and parts of the Rift Valley where agriculture is a key economic activity.
JKUAT's institute of energy and environmental technologies has been selling young worms, which take up to four months to reach maturity, to farmers for 2,500 shillings ($25) per kilogram for the past two years.
"But it is not easy to estimate how many farmers are using the technology since some of them are doing it on a very small scale," Mr. Momanyi told the Thomson Reuters Foundation by phone.
ICIPE is trialing vermiculture in a pilot project in central Kenya, where it is teaching a group of farmers how to rear worms and use their waste to fertilize their farms.
Mr. Karanja said the vegetative part of the plant requires nitrogen in order to grow, while phosphorous helps in the formation of roots and the crop's structure.
"Worm juice is rich in these ingredients," he told the Thomson Reuters Foundation.
Worm juice as worry-free
For farmers like Macharia, synthetic fertilizers are also costly and – apart from the risk to humans, animals, and the environment – they harden the soil, experts say. That affects hinders plants' ability to access nutrients.
Perhaps most importantly for subsistence farmers like Macharia, worm juice comes worry-free.
"When I apply the worm juice in the morning, I can pick my vegetables in the evening and prepare a meal with the greens without worrying about getting sick," he said, referring to his concerns over exposure to synthetic fertilizers.
Macharia noted that vermiculture is popular in countries like the United States, which is where he stumbled across the technique while on a trip to learn about farming without fertilizers.
Embracing organic farming at home would ensure long-term soil health and help to protect the environment, he said.
"When the environment is safe, the food we eat is safe and everybody will be healthy," said Macharia.
This story was reported by the Thomson Reuters Foundation.