Faravavy, 32, lives in the middle of an arid plain 93 miles south of Betioke in southern Madagascar. She tries to support herself and her three children by cultivating maize, red beans and manioc, but is unable to grow enough to generate an income or even feed her family all year round. "We never have any crops to sell," Faravavy says. "We eat everything we produce."

During the lean season, which runs from October to March, when new crops are planted but not yet harvested, Faravavy and her youngest children go out to the forest to dig up roots. "It's hard. You have to dig deep to get them out, and they taste very bad if the rains haven't come yet. I leave at seven in the morning and come back in the afternoon, and we just have enough to eat in the evening. Then the next day, we go again."

Faravavy's village, Ankazomanga, used to be close to the forest, but as more trees have been cut down, villagers have had to walk further and further to find food. "When I was small, we lived better than my kids do now," she says. "There was rain, and always enough to eat."

Erratic weather and a locust plague have taken a toll on Madagascar's rice and maize harvests this year, leaving up to 4 million people – 28% of households – in rural areas short of food, according to a report produced by the World Food Programme (WFP) and the Food and Agriculture Organisation (FAO). A further 9.6 million people are estimated to be at risk of food insecurity.

Aerial surveys are planned to help map locust populations. Photograph: Reuters

The crop and food security assessment mission, conducted in June and July by the WFP and FAO, attributed the poor agricultural season to a combination of factors. These included flooding caused by cyclone Haruna this year, followed by a period of poor rains.

This is what happened in Ankazomanga. "Our fields were flooded in February when cyclone Haruna came. Since then, there has been no more rain," Faravavy says. "We used to harvest 15 carts full of manioc. This year, we barely filled up one." She points to a small pile of manioc roots drying on her roof. "There. That's it. That's all we harvested this year."

According to the WFP-FAO report, rice production declined by 21% this year, resulting in a significant national deficit. Maize production is also down, and an estimated 28,000 metric tons will need to be imported to meet domestic requirements.

The FAO, together with the government, has started a three-year campaign to combat the ongoing locust plague. This will involve aerial surveys to help map locust populations and the spraying of more than 2m hectares (4.9m acres) of infested land with pesticides.

The WFP and FAO also have programmes in the south to help alleviate the food crisis. These include the provision of food assistance; food-for-work programmes; support to farmers to increase the production of staple crops such as rice, maize and tubers; and the promotion of short-cycle crop varieties adapted to local climatic conditions.

In Ankazomanga, for instance, the local NGO Conseil Diocésain de Développement (CDD), which implements WFP projects, has taught villagers about water management and how to produce new crops. Next to every house, young papaya trees and vegetables have been planted. They are watered with the household's washing water, which normally gets thrown out. "We teach the villagers not to waste a drop of water. There isn't enough water to go around, so each drop needs to be used," says Eliane Rasoamananjara of CDD.

The first papaya trees were planted during the last lean season and are expected to yield fruit by December, when the lean season is at its height. The agency has provided new seeds, so that younger saplings can be grown under the bigger trees. "If they keep up this cycle, they should have fruit and vegetables to get through the lean season in the future," says Rasoamananjara.

Outside the village, where there is a view of the ever-receding forest, the villagers have planted a field of acacia trees that can be used for honey production and building materials. "These species are refertilising the soil, allowing farmers to grow crops between the trees. We have organised the villagers to water the plants once every two weeks. They're very motivated, as they know they need food," says Rasoamananjara.

The trees were planted through a food-for-work scheme, which enabled Faravavy to buy two goats. "These animals are my insurance," she says. "I can sell them when we run out of food completely."