For thousands of years, cultures around the world have revered the sweet aroma of frankincense.

In Ancient Egypt, embalmers stuffed it inside the bodies and tombs of pharaohs and queens and its ashes were ground into eyeliner. Religious texts say rabbis burned it as offerings in Jerusalem’s temples, the three biblical Magi gifted it to the newborn Jesus Christ and the Prophet Muhammad prescribed it for fumigating houses and treating numerous ailments. It was also a staple in ancient Chinese medicine.

Today its smoke still permeates centers of worship and Ethiopian coffee ceremonies. Demand is also increasing in the West: It’s found in natural medicine stores, spiritual shops, bespoke boutiques and online. Sephora, the big chain beauty store, sells essential oil and expensive perfumes that contain it, like Chanel No. 5. Just down the block from a Sephora in Downtown Brooklyn, Tea Brown, co-owner of a traveling spiritual shop called Tea on Mars, sells bags of the gnarled, golden resin from Somalia. It’s so popular, she says, she has to restock it daily.

But her customers shouldn’t take its availability for granted: Frankincense may not be around much longer, warns a study published Monday in Nature Sustainability.

“The first time I said something about frankincense being under threat, there was panic,” said Frans Bongers, an ecologist at Wageningen University and Research in the Netherlands who led the study. “I got a lot of people asking me about it,” including Catholic clergy and top suppliers.