Five-time Olympic champion Missy Franklin has announced her retirement from swimming aged 23, saying she is "ready not to be in pain every day".
The American won four gold medals at London 2012 as a 17-year-old amateur.
But a shoulder injury and issues including depression have affected her since, and she is "ready" to retire.
In a letter to ESPN, Franklin wrote: "I began to realise that my greatest dream in life, more so than Olympic gold, has always been becoming a mom."
She became the first woman to win six golds at a single World Championships in 2013 and was named Laureus Sportswoman of the Year in 2014.
Franklin won her London 2012 golds in the 100m backstroke, 200m backstroke, 4x200m freestyle relay and 4x100m medley relay, adding a bronze in the 4x100m freestyle relay. She retires with 11 world golds in total.
In the letter, Franklin said swimming was her "first love" and the first 18 years were "picture perfect", adding: "The equation couldn't have made more sense - you work hard, you have a positive attitude, you show up every day, give your best, and you get faster."
However, she began to battle physical and mental issues before the 2016 Rio Olympics.
Franklin added: "I've been very open about what I went through as I prepared for the Olympics in 2016. The struggles I endured included shoulder pain whenever I tried to train or compete, depression, anxiety and insomnia.
"I trained through it all - both the physical and emotional pain - and did everything I possibly could have to keep my head held high.
"Looking back, surviving through those eight days in Rio was the greatest accomplishment of my career."
She won another Olympic gold in 2016 in the 4x200m freestyle relay for appearing in the heats, but had surgery on both shoulders in January and February 2017.
After the operations, the Californian was receiving physical therapy multiple times a week, before going through rounds of cortisone injections and an ultrasound bicep tendon injection to help relieve the pain, "but nothing was working".
Life after swimming
Franklin's letter ended: "It took me a long time to say the words, 'I am retiring.' A long, long time. But now I'm ready.
"I'm ready to not be in pain every day. I'm ready to become a wife and, one day, a mother.
"I'm ready to continue growing each and every day to be the best person and role model I can be. I'm ready for the rest of my life."