In 2015, Venezuelan McDonald’s outlets offered cassava fries when they ran out of potatoes. Photograph: Guillermo Legaria/AFP/Getty Images

Venezuela has suffered food shortages for several years but things only seem to be getting worse. People are resorting to the black market for food, skipping meals and rummaging through garbage in search of sustenance.

It is a plant that millions depend on for survival. But another, identical variety can be lethal – and desperate people turning to the black market can’t tell them apart

Last year, three quarters of adults involuntarily lost an average of 19lb (8.6kg). Malnutrition is on the rise and people are being exposed to lethal foods.

At least 28 people have died as a result of eating bitter cassava, having mistaken it for the sweet variety.

Cassava, also known as manioc and yuca, is a staple food for about 700 million people worldwide. The perennial plant is native to South America but was brought to Africa by 17th-century explorers and later introduced to Asia. It thrives in tropical climates. The plant is very resilient, surviving where many other crops fail, and involves less human investment per calorie than potatoes. It is often poorer communities that rely on cassava for their survival.

Both the leaves and the tubers of a cassava plant can be used in a wide range of foods. The tubers are similar to potatoes and can be prepared in much the same way: boiled, fried or mashed. In Venezuela in 2015, McDonald’s outlets offered cassava fries when they couldn’t get hold of potatoes. The tubers can also be ground into a flour, which can be used in cakes and bread. In the west, cassava is best known in the form of tapioca.

But this versatile, resilient crop has one significant downside: raw, unprocessed cassava is a source of cyanide.

All parts of the cassava plant contain cyanogenic glycosides that help defend it against pests. The cyanogenic glycosides impart a bitter taste that usually puts off any casual grazers once they have taken the first bite. But the plant also has a backup plan to stop more determined herbivores. The cyanogenic glycosides can be rapidly processed by enzymes within the plant to release lethal hydrogen cyanide. The enzymes and glycosides are separated within the plant cells but if the tissue is damaged, for example by a bite, the two mix and rapidly release the toxic compound. Enzymes within the human gut can also liberate hydrogen cyanide from the cyanogenic glycosides if ingested.

Hydrogen cyanide disrupts the fundamental process of respiration within cells. Without energy, cells die rapidly and on a massive scale, leading to loss of life. Symptoms include vomiting, nausea, headaches and convulsions. Treatment is possible but must begin quickly, before irreversible damage is done.

It may seem extraordinary that such a potentially lethal plant would become the third most important crop in the tropics. However, the protection against pests is an advantage when growing the crop and human ingenuity means that the tubers can be processed to bring the toxic content down to safe levels. The amount of cyanogenic glycosides in the tubers varies widely with plant variety (from 50mg of cyanide equivalent per kg up to 500mg), and is indicated by the bitterness of the tuber. It is the sweet varieties that are normally eaten and it is these that you would usually find in Venezuelan markets.

The bitter varieties can be visually very similar to the sweet but require careful processing to make the flour safe to eat. Peeling, grating or grinding the tubers followed by soaking in water causes the release and safe evaporation of the hydrogen cyanide. The time needed for soaking will vary according to local temperatures and the variety of cassava being prepared. As has been seen in Venezuela, preparing bitter cassava in the manner of a sweet variety can have fatal consequences.

Humans do have some natural defence against the ingestion of cyanides. Rhodanese enzymes within the body’s cells add a sulfur atom to the cyanide unit, converting it from the highly toxic cyanide (CN) to the much less toxic thiocyanate ion (SCN). Normally a human could eat 30-35mg of hydrogen cyanide from cassava without any ill effects – but problems occur if they are in poor health or if the influx of cyanide is sudden and greater than the detoxification system can cope with.

There are laws in Venezuela prohibiting the sale of bitter cassava roots for food. But desperation increases and black markets grow, the chance of it being sold and eaten in mistake for the sweet variety gets higher. Venezuela’s troubled economy and food shortages are not expected to improve over the coming year. The last reported fatal cases of cassava poisoning occurred in February 2017. Let’s hope these are the last.