Anyone who has every run a marathon—even those who stand on the starting line in the Olympics—know that the last 5 or 6 miles of their 26.2-mile quest are almost always the worst. Often, that’s what you “hit the wall” or where “the wheels fall off,” ruining what might have been a consistent pace and effort for the previous 20-21 miles.

Here’s a look at what makes those final miles the worst and, more importantly, what can you do to ensure you survive that arduous segment before the finish line.

These final miles are the most challenging because you are mentally and physically drained. Physically speaking, you have most likely used up nearly all of your stored carbohydrates, in the form of the glycogen that resides in the liver and muscles. Once you’ve reached glycogen depletion—meaning your body has burned through its energy stores—your body scrambles to metabolize fat, which is much harder to do during the race. As such, your body starts to shut down. Your legs and arms feel like logs and your brain tells you that you need to quit. The wall stands before you, and with each passing mile, it grows taller and more formidable.

What can you do about this conundrum? To conquer these final miles, consider the notion that it’s not about “breaking through the wall,” but instead never getting to the wall in the first place. Once you’ve reached the point of glycogen depletion there is usually no turning back, it’s incredibly hard to replace these lost carbohydrates in a timely manner. The body is physically spent and entirely out of fuel.

So, to truly conquer the final miles of your marathon, keep these three points in mind:

1. Train Smart

Many marathoners who line up at the start line on race day have not done the right kind of training. You’re not going to reach your performance-oriented goals primarily by doing incrementally longer long runs at a slow to moderate pace. Brad Hudson, who has coaches several elite-level marathoners in his Hudson Elite crew in Boulder, Colo., points out that runners need to train with some very specific workouts to get their body (and mind) used to their goal pace in order to build up muscular endurance and strength. “You need to do workouts like 15 miles at goal pace or 35K runs within 10 percent of goal pace before the marathon,” he says. These specific workouts, like longer progression runs or long runs with intermittent surges, also teach the body to consume fuel optimally. “Your body can only burn certain amounts of fats and sugars [glycogen],” Hudson says. “It’s a balance, and that’s where specific training can help you achieve that right balance of fuel consumption.”

Jeff Gaudette, the head coach of of Runners Connect online coaching platform, considers fueling to be a vital element of marathon preparation. “During training, they should be very diligent about eating and drinking during their long runs and harder workouts,” he says. “Even if you don’t feel like you need it, practice eating and drinking. This will train your body to absorb and process the carbohydrate you take in more efficiently.”

READ MORE: How to Shake Up Your Weekly Long Run

2. Race Smart

Racing smart means having realistic expectations out on the course about what you can actually achieve in terms of finishing time and being able to adjust your pace and effort accordingly. If you’ve trained for a 3:15 marathon, don’t go out and run the first half in 2:55 pace. Have a good understanding of your fitness level and what you’re capable of at that moment in time, Hudson says. “You need to factor in your training, your past marathon races, and other races,” Hudson says. “Know what you can and cannot do.” Runners that head out too fast in the early stages and don’t fuel appropriately, tend to consume their valuable glycogen reserves too soon. Another element of racing smart means paying close attention to the conditions on the course. Hudson contends that every six degrees (Fahrenheit) over 54 degrees equals 1 minute that you should add to your expected finish time (goal pace). He suggests that runners look at the average temperature at the time of the race and adjust as necessary. Wind and dew point (humidity) are also factors to consider.

Jeffrey Eggleston, who has represented the U.S. at three world championships, says that he continually monitors himself in the early stages of the race. “Learn how to read your body,” he says. “Get that sensory feedback.” Eggleston says he goes through a mental checklist that includes a variety of factors and makes adjustments based on it. Two specific areas Eggleston checks are his lungs and his legs. “For breathing, I try to maintain an even breath pattern between 2-2 and 2-1 (2 strides per inhale and 1-2 strides per exhale), he says. “1-1 would be way too hard for a marathoner (almost panting), and anything beyond 2-2 would likely be too easy. His leg check-in focuses on cramping or mid-race soreness, which indicate poor hydration (electrolyte imbalance) or overexertion (poor pacing). He contends that there is too much emphasis on making it to the half-marathon point at a certain time. Instead, he says both halves of the marathon are not equal.  “You’re running that second half with a different fuel source and different energy expenditure,” he says. By the 20-mile mark, Eggleston says, if you are feeling good, you’ll know you governed your energy correctly.

READ MORE: What You Need to Know to Run a Marathon

3. Fuel Smart

Because the marathon is all about energy governance, Gaudette recommends that runners pay close attention to the fuels that they consume early in the race. Waiting until mile 13 or 16 or 20 to consume gels or carbohydrate-rich endurance drinks is too late. “Definitely try to include carbohydrates in the beverage you choose to drink on the course,” he says. “If you’re not carrying your own water bottle with your own endurance drink, make sure your stomach is comfortable with the fluid provided on the course.” Gaudette advises that runners should drink every 15-20 minutes, and that the volume that they consume should not be not a lot, roughly 4-6 oz.“This will give you a constant supply of carbohydrates and help your body process it more efficiently,” he says. But it’s important to note that runners should consume at least cup of water for every cup of endurance drink they consume—and even more on warmer days or if a runner has a high sweat—to allow for efficient and effective digestion of the carbs.

READ MORE: Make Your Fall Marathon a Success