For anyone with a sweet tooth, a chocolate is nothing less than a gift from God. No matter what brand or type it is, this delicious snack can make our day, and almost all of us love it.

However, the joy of eating chocolate may not last long, especially by the 2050s, as the planet is set to run out of cacao seeds – the key ingredient in cocoa, cocoa butter and chocolate.

The cacao plant responsible for producing these seeds is having trouble surviving and is likely to become extinct in the next 40 years, according to a report by the US National Oceanic and Atmospheric Administration (NOAA).

These plants grow in very specific conditions and areas – within 10 degrees north and south of the equator – featuring nitrogen-rich soil, lots of humidity and abundant rainfall. Typically, more than half of the world's chocolate comes from Côte d'Ivoire, Ghana and Indonesia.

But things will not remain the same due to climate change. The NOAA report said that the effect of global warming will be so drastic that these plants will be unable to grow and thrive due to unsuitable conditions.

Around 90% of more than 290 chocolate-producing locations will not remain suitable, according to the report. Producers, on the other hand, could face the dilemma of taking their plantations further up on to the mountains – areas mostly preserved as wildlife refuges.

"All the indicators are that we could be looking at a chocolate deficit of 100,000 tonnes a year in the next few years," Doug Hawkins, from London-based research firm Hardman Agribusiness, told Daily Mail.

This is obviously a big concern, particularly for people in the West, since the typical Western consumer eats an average of nearly 286 chocolate bars a year.

However, as per Business Insider, genetic modification might offer a solution to this problem. Renowned candy producer Mars – known for its popular Snickers bars – has taken steps to try and keep the raw materials flowing, one of which revolves around the idea of genetic engineering.

The multi-billion dollar corporation has pledged $1 billion to reduce its carbon footprint and, as part of that effort, it has partnered with a group of genetic engineers at UC Berkeley in California.

Myeong-Je Cho, the director of plant genomics at the university, has kept tiny green cacao seedlings in refrigerated containers in order to work on them and make them a little more flexible.

Researchers plan on using new gene-editing tech CRISPR-Cas9 to modify these seedlings and make them capable enough to survive in warmer as well as drier conditions. The technique, which involves finding crucial pieces of DNA and replacing it with altered DNA, has previously been used for other purposes like converting plants into natural lamps that glow in dark or highly responsive spy sensors.

If this happens and scientists are successful in tweaking the cacao plant's DNA, there might be no need to relocate the plants and use other preservation efforts.