At the age of 74, Mahatma Gandhi lived for 21 days without eating food during a hunger strike. In spite of his old age and already gaunt demeanor, the civil rights activist was able to survive starvation.

According to some reports, certain people have managed alive for 70 days without eating food. What’s fascinating about the human body is that even though we would die within days of not drinking any water, it's able to develop defense mechanisms that help us truck on without eating, for quite some time.

How does the body do it? Firstly, whether you are hydrated during your time of starvation makes a big difference. “The duration of survival without food is greatly influenced by factors such as body weight, genetic variation, other health considerations and, most importantly, the presence or absence of dehydration,” Dr. Alan Lieberson writes on Scientific American. Though numerous factors are present in determining how long we can live without eating, our bodies go through specific metabolic processes that help us to conserve energy when food isn’t present, essentially buying us time to search for nutrition.

6 Hours After Eating

After we eat, our bodies digest food and break down glycogen, which are the molecules that store energy. This process produces glucose — a molecule that is used as a major source of energy and absorbed into the bloodstream.

Glucose is used as our primary energy source if we’re on a normal eating schedule. This keeps us feeling well-fed and happy, because glucose goes to our liver and muscles, and fatty acids get stored for later use. Glucose fuels us for about six hours, and once it runs out, we begin to feel that “hangry” state when we’re hungry and grouchy.

Starvation Mode: 3 Days of No Food

Your glucose stores may last you for up to 24 or 48 hours, though they will mostly be depleted after six hours. Then, not only will you be hangry, but your body will be entering a state of ketosis, which involves elevated levels of ketone bodies in your system. Ketone bodies are produced from fatty acids when liver glycogen is entirely depleted, and are used for energy. Typically, if you’re fasting or starting a keto diet (a low-carb diet), your body enters ketosis. Sometimes this diet is used as a medical intervention to treat intractable epilepsy.

However, your brain can’t be fueled by fatty acids as its only source of energy, so it will continue to use the last remaining glucose stores in your body. Your brain actually uses 120 grams of glucose every day, which is a significant amount — so when glucose is depleted, your body has to figure out a back-up plan for the brain.

On day three, your brain will turn to the energy from ketone bodies — getting about 30 percent of its energy from them. By the time it’s day four, however, your brain will be getting nearly 70 percent of its energy from ketone bodies.

Eating Nothing for Over 72 Hours

The rough part happens after 72 hours of no eating — this is the stage of autophagy. Once the fats are broken down, your body turns to breaking down protein in muscles, essentially wasting away your muscles. At this point, your brain’s requirement for glucose will have dropped from 120 grams per day to only 30 grams. But your brain will need to start getting energy from protein next. Breaking down protein and releasing amino acids into the bloodstream will produce more glucose; this transformation takes place in the liver, and your brain will be fueled by its much-needed glucose once again. Regardless, though your brain will be able to survive from protein, your muscles will slowly disappear.

Interestingly, the greatest amount of protein loss occurs during the first 72 hours. Afterward, the body adapts to conserve protein. Essentially, your metabolism slows down so much to the point that your body uses the smallest amount of energy as possible.

Your body may be able to survive for up to three weeks or even up to 70 days, depending on whether you’re also hydrated or have plenty of fat reserves to use up for energy. However, at a certain point, your immune system will be weakened due to lack of vitamins and minerals. Typically, two diseases can occur in end-stage starvation: marasmus and kwashiorkor. Marasmus is a form of severe malnutrition and energy deficiency, characterized by loss of muscle mass and edema, or stomach bloating. Kwashiorkor is the most common form of malnutrition in developing countries, caused by not getting enough protein and also characterized by fatigue, edema, and decreased muscle mass.