Along the way to becoming a Paralympic gold medalist, Mallory Weggemann liked to say that swimming saved her. When her life took another unexpected turn, she was afraid the sport that kept her afloat might be lost to her forever.

The Eagan native already was looking ahead to the Rio Paralympics when she severely injured her left arm in 2014. For five months, she was out of the water—where she found strength after she was paralyzed below the abdomen in 2008—and nearly out of hope that her career could continue.

“There was no way I could rehab and be ready for Rio in two years,’’ she said. “I couldn’t even push myself in my own wheelchair, let alone get into a pool and swim.’’

But Weggemann couldn’t shake the notion that she was just getting started when she won gold and bronze medals at the 2012 London Paralympics. Despite losing 75 percent of the function in her left arm, she won a place on the U.S. team for the Rio Paralympics, where she will swim seven individual events beginning Thursday with the 400-meter freestyle.

Weggemann, 27, is quick to credit a wide network of supporters for her return. Her high school swim coach, Steve Van Dyne, got her back into the pool and devised a workout routine that helped her overcome the pain and weakness in her arm. She rebuilt her strength with trainers Zach Martens and Ryan Svenby, and agent Jeremy Snyder — who is also her fiancé — helped her become a marketing powerhouse, with sponsors including Hershey’s and Procter & Gamble.

The real key, though, lay in Weggemann’s unwillingness to let go of a sport that has given her a second lifeline.

“She came to me in a dark place, a dark hole physically and mentally,’’ said Van Dyne, a physical education teacher and former girls’ swim coach at Eagan High School. “It was a huge process of building her up to make her truly believe this can happen.

“Even six months ago, there was still a little question in her head of, ‘Will I be able to do this?’ But she will do anything possible to achieve her goal. Once she believed, the rest was easy.’’

A swimmer since age 7, Weggemann swam for Van Dyne at Eagan before the injury that changed her life. She was receiving a series of epidural injections to treat back pain caused by a shingles infection. After the third, she lost all sensation and movement below her abdomen; doctors thought her condition was temporary, but more than eight years later, she remains paralyzed.

Weggemann learned about the Paralympics a few months later, when the trials for the U.S. swim team for the Beijing Paralympics were held at the U. She quickly rose to the ranks of the elite. A 13-time gold medalist at the world championships, Weggemann has been selected as USA Swimming’s disabled swimmer of the year three times and holds 10 world records.

Through swimming, Weggemann said, she gained so much upper-body strength that she didn’t feel limited by her paralysis. That changed in an instant when a shower bench in a hotel room collapsed underneath her in March 2014. Doctors initially thought the severe nerve damage in her arm would heal, but two months ago, she was told it is permanent.

At that point, swimming was the least of her worries. With only one fully functional limb, Weggemann lost much of her independence, along with her confidence and strength.

“It was a hard time for her and us,’’ her father, Chris Weggemann, said. “The arm injury dramatically changed her daily life. She couldn’t drive for a long time. She couldn’t load her own wheelchair, and she fell a lot of times, because she couldn’t brace herself well. We didn’t know what was going to happen.’’

In the first five months after her injury, Weggemann gained 20 pounds and had to rely on others to do nearly everything for her. She feared she would have to retire from swimming, but Snyder urged her to call Van Dyne to see if he was willing to ease her back into the water.

Her former coach didn’t hesitate. And by the end of the summer, neither did she.

“I came to a crossroads,’’ Weggemann said. “I could either slow down and realize it was just too big of a hurdle to overcome in two years, or I could fight for it.

“I decided that even though it would be mentally and physically and emotionally exhausting to try to come back from this injury, it would be less painful than not going to Rio would ever be. That’s what motivated me.’’

Van Dyne and Weggemann crafted a training plan that stressed quality over quantity. In the workout room, Martens and Svenby came up with ways to compensate for her inability to grip with her left fingers, such as tying weights to her hands. When Weggemann was in too much pain to come to the gym or pool, she learned to accept it, rest up and be ready to work the following day.

One year after returning to training, Weggemann made the U.S. team for last summer’s Parapan American Games. She finished the meet with two gold medals, two silvers and a bronze, stoking her hopes for Rio.

At the Paralympic trials in June, she had another strong meet, swimming one of the fastest times of her career in the 200 individual medley.

“It was overwhelming to see,’’ Chris Weggemann said. “It was incredible how fast she swam. I still can’t believe it.’’

It’s already been a memorable year for Weggemann. An advocate for disability rights, she attended the Democratic National Convention in July, where she led the recitation of the Pledge of Allegiance and spoke to delegates and elected officials about issues affecting the disabled.

After the Paralympics, she will move on to another challenge. She and Snyder will be married in December, and she is working with therapists at the Mayo Clinic to learn how to use a set of custom-made leg braces so she can walk down the aisle — and perhaps even dance.

Weggemann knows that will be a long and exhausting process, but her road to Rio has made her feel that anything is possible.

“I’m ready to have fun and reap the rewards of the fight of the past two years,’’ she said. “For so long after my arm injury, I thought I was going to have to give it all up. I want to finish this final stage of my journey with everything I’ve got left.”