Modern archeologists, excavating ancient Egyptian tombs, have often found something unexpected amongst the tombs’ artifacts: pots of honey, thousands of years old, and yet still preserved. Through millennia, the archeologists discover, the food remains unspoiled, an unmistakable testament to the eternal shelf-life of honey.

There are a few other examples of foods that keep–indefinitely–in their raw state: salt, sugar, dried rice are a few. But there’s something about honey; it can remain preserved in a completely edible form, and while you wouldn’t want to chow down on raw rice or straight salt, one could ostensibly dip into a thousand year old jar of honey and enjoy it, without preparation, as if it were a day old. Moreover, honey’s longevity lends it other properties–mainly medicinal–that other resilient foods don’t have. Which raises the question–what exactly makes honey such a special food?

The answer is as complex as honey’s flavor–you don’t get a food source with no expiration date without a whole slew of factors working in perfect harmony.

The first comes from the chemical make-up of honey itself. Honey is, first and foremost, a sugar. Sugars are hygroscopic, a term that means they contain very little water in their natural state but can readily suck in moisture if left unsealed. As Amina Harris, executive director of the Honey and Pollination Center at the Robert Mondavi Institute at Univeristy of California, Davis explains, “Honey in its natural form is very low moisture. Very few bacteria or microorganisms can survive in an environment like that, they just die. They’re smothered by it, essentially.” What Harris points out represents an important feature of honey’s longevity: for honey to spoil, there needs to be something inside of it that can spoil. With such an inhospitable environment, organisms can’t survive long enough within the jar of honey to have the chance to spoil.

Honey is also naturally extremely acidic. “It has a pH that falls between 3 and 4.5, approximately, and that acid will kill off almost anything that wants to grow there,” Harris explains. So bacteria and spoil-ready organisms must look elsewhere for a home–the life expectancy inside of honey is just too low.

But honey isn’t the only hygroscopic food source out there. Molasses, for example, which comes from the byproduct of cane sugar, is extremely hygroscopic, and is acidic, though less so than honey (molasses has a pH of around 5.5). And yet–although it may take a long time, as the sugar cane product has a longer shelf-life than fresh produce, eventually molasses will spoil.

So why does one sugar solution spoil, while another lasts indefinitely? Enter bees.

“Bees are magical,” Harris jokes. But there is certainly a special alchemy that goes into honey. Nectar, the first material collected by bees to make honey, is naturally very high in water–anywhere from 60-80 percent, by Harris’ estimate. But through the process of making honey, the bees play a large part in removing much of this moisture by flapping their wings to literally dry out the nectar. On top of behavior, the chemical makeup of a bees stomach also plays a large part in honey’s resilience. Bees have an enzyme in their stomachs called glucose oxidase (PDF). When the bees regurgitate the nectar from their mouths into the combs to make honey, this enzyme mixes with the nectar, breaking it down into two by-products: gluconic acid and hydrogen peroxide. “Then,” Harris explains, “hydrogen peroxide is the next thing that goes into work against all these other bad things that could possibly grow.”

For this reason, honey has been used for centuries as a medicinal remedy. Because it’s so thick, rejects any kind of growth and contains hydrogen peroxide, it creates the perfect barrier against infection for wounds. The earliest recorded use of honey for medicinal purposes comes from Sumerian clay tablets, which state that honey was used in 30 percent of prescriptions. The ancient Egyptians used medicinal honey regularly, making ointments to treat skin and eye diseases. “Honey was used to cover a wound or a burn or a slash, or something like that, because nothing could grow on it – so it was a natural bandage,” Harris explains.

What’s more, when honey isn’t sealed in a jar, it sucks in moisture. “While it’s drawing water out of the wound, which is how it might get infected, it’s letting off this very minute amount of hydrogen peroxide. The amount of hydrogen peroxide comes off of honey is exactly what we need–it’s so small and so minute that it actually promotes healing.” And honey for healing open gashes is no longer just folk medicine–in the past decade, Derma Sciences, a medical device company, has been marketing and selling MEDIHONEY, bandages covered in honey used in hospitals around the world.

If you buy your honey from the supermarket, that little plastic bottle of golden nectar has been heated, strained and processed so that it contains zero particulates, meaning that there’s nothing in the liquid for molecules to crystallize on, and your supermarket honey will look the same for almost forever. If you buy your honey from a small-scale vendor, however, certain particulates might remain, from pollen to enzymes. With these particulates, the honey might crystallize, but don’t worry–if it’s sealed, it’s not spoiled and won’t be for quite some time.

A jar of honey’s seal, it turns out, is the final factor that’s key to honey’s long shelf life, as exemplified by the storied millennia-old Egyptian specimens. While honey is certainly a super-food, it isn’t supernatural–if you leave it out, unsealed in a humid environment, it will spoil. As Harris explains, ” As long as the lid stays on it and no water is added to it, honey will not go bad. As soon as you add water to it, it may go bad. Or if you open the lid, it may get more water in it and it may go bad.”

So if you’re interested in keeping honey for hundreds of years, do what the bees do and keep it sealed–a hard thing to do with this delicious treat!