Injuries are a reality of running. New York City Marathon-veteran Amy Bahrt would know. She’s been running for 35 years, and has completed 26 New York City marathons.

On Nov. 5, over 50,000 runners from all over the world will gather at the start line for the 2017 New York City Marathon. By the time they take on the 26.2 mile course, they will have run hundreds of miles in training. And with all that mileage, comes injuries.

But despite the ubiquity of shin splints, knee inflammation and stress fractures, it’s not enough to stop runners like Amy from doing what they love. “Injuries and marathon running: they go together,” said Bahrt, 66.

After every grueling training and marathon, Bahrt would easily bounce back from her injuries.But after finishing the Boston Marathon in 2014, Amy knew something was different. “I got off the bus and I couldn’t walk,” she said. She was diagnosed with osteoarthritis in her knees. Her doctor told her she’d never run again.

Amy switched to Dr. Andrew Rosen, an orthopedist who heads the professional and “sub-elite” medical tent at the New York City Marathon. Rosen has run 15 marathons himself, including five New York marathons, and his practice is well-known in the New York running community.

“In general, the art of running in terms of training is really trying to figure out how hard you can run and stay below threshold of injury,” said Rosen. But marathons, by their nature, push runners to their limits in both training and the race itself. Though runners are conditioned to be fearful of overtraining, science says otherwise.

Although running has become increasingly popular, research on its related injuries is lagging behind, according to Dr. Sten Rassmusen, an associate professor at Aalborg University Hospital in Denmark. In 2013, Rassmusen and three co-authors studied 662 marathon runners to find correlations between weekly running volume and the risk of injury.

Rassmusen and his team found that runners who run more are less susceptible to injury. To best reduce the risk of a running related injuries, marathon runners should run at least 30 kilometers a week in the weeks leading up to the marathon.

When injuries do inevitably occur, Dr. Rosen emphasized that runners need not abandon their goals. Many injuries can be managed with modified training schedules. More severe injuries may require moving training away from running and towards cross-training activities like biking, swimming and physical therapy.

Physical therapy is one of the more popular options for runners who sustain injuries. Dan Gliganic, 29, who brands himself as a recreational runner, has had a wide range of injuries: a fractured sesamoid bone in the ball of his foot, groin and hip injuries, knee inflammation, and a condition known as runner’s stomach. This occurs when the blood rushes to the outer extremities and away from the stomach, causing extreme pain. After so many injuries, Gliganic is looking for a different activity that involves less impact on the leg.

Wendy Winn, a physical therapist and owner of Custom Performance, a therapy, performance service and recovery clinic, estimates 100 of her clients will participate in this year’s marathon. To better serve them, Winn’s team keeps up with the latest research on running injuries and often encourages her clients to keep training instead of stopping running altogether.

“We just try to work with runners as much as possible,” Winn said. “Someone can go to a doctor right now and they’ll just shut them down. They’ll just say ‘you have Achilles tendinitis, there’s no way you should run at all’ and we just think that’s a little bit ridiculous.”

Winn states that if someone has Achilles tendinitis and they just take time off they’ll still have it. She looks to management solutions instead, like analyzing runners’ form.

For Amy Bahrt, Dr. Rosen’s care was a revelation. “‘You’ll find out you can run or that you can’t,’” she recalled him saying, “‘but if you don’t try you’re not going to know.’”

She wanted to know. For three years, she’s followed a strict cross-training regimen of swimming, pilates and running. Dr. Rosen injected her knees with Orthovisc, a solution of hyaluronic acid that helps to lubricate and cushion the knee joint. She’s also worked extensively with a physical therapist.

Since May, she’s successfully completed races of five and ten kilometers, a half-marathon, and an 18-mile race. And in November, she hopes to finish the Philadelphia Marathon—away from the pressure and publicity of a New York course she had made her own for years.

“I feel it’s a gift and I’m not taking it for granted,” she said. “The benefits far outweigh any injuries.”

The Doctors’ Advice for Runners:

Aches and pains are normal, says Dr. Rosen. Pain that gets better during a run is benign, but pain that worsens or forces you to stop is more serious. If the pain is localized and isn’t alleviated by rest and anti-inflammatories, it might require medical attention.

Runners should pay particular attention to pain in their hips, says Dr. Rosen. In the most severe cases, runners may have a stress fracture that can crack completely under additional stress.

Runners should be mindful of the weather, and hydrate accordingly. On hot days, runners should drink a lot of water and hydration supplements, like Gatorade. If it’s cooler, runners still need to maintain their hydration, but don’t need to go overboard.

For recreational runners, Dr. Rasmussen suggests resting for 10-14 days before the marathon to have a better performance, especially if a runner has been training heavily beforehand.