Katie Ledecky will skip the 200-meter and 1,500-meter freestyle in South Korea. (Lee Jin-man/AP)

GWANGJU, South Korea — Katie Ledecky’s ambitious program at the FINA world championships was upended Tuesday morning when the five-time Olympic champion pulled out of two races, citing medical issues, a surprising twist to what already had been a difficult week.

USA Swimming officials announced about 90 minutes before Ledecky was scheduled to hit the pool for a 200-meter freestyle preliminary heat that she had been scratched. She withdrew from the evening’s 1,500-meter final later Tuesday morning, and uncertainty loomed over her remaining races at the year’s biggest swim meet.

“I don’t necessarily want to put a percentage on it, but I’m hopeful we’re able to see her racing again this week,” said Greg Meehan, the U.S. women’s coach. “But all that is is a hope at this point.”

Meehan said Ledecky was suffering from a physical ailment and was working with the team’s medical staff. He was not certain of her exact diagnosis, and team officials were still waiting on results from a number of tests. No decision had been made on whether Ledecky would compete in the other two events she had scheduled this week.

“We hope that she rebounds quickly. She was feeling a little bit better [Monday] night. We were hopeful [Tuesday, but] she woke up [Tuesday] morning and was not feeling well at all,” Meehan said. “We’re just going to take it session by session and then day by day. If we can get her back in the meet at some point, that would be the ideal scenario.”

The decision to withdraw from Tuesday’s races came two days after the biggest loss of Ledecky’s stellar career. On Sunday night, the 14-time world champion was upset in the 400-meter freestyle race by Ariarne Titmus, an 18-year-old Australian. Ledecky was visibly disappointed with the result but said after the race, “I felt great.” Asked at the time whether she had any physical issues, she shook her head and said “no” four times. But team officials had started to worry that something was amiss.

Ledecky, a 22-year-old Bethesda, Md., native, won Olympic gold in the 200 at the Rio Games in 2016 but hasn’t dominated that event as much as she has other distances. She took silver at the 2017 world championships and bronze at the Pan Pacific championships last summer. She still entered the week as a favorite to reach the podium and was scheduled to swim one lane over from Titmus in qualifying.

The 1,500, on the other hand, is one of her signature distances: A win would have marked Ledecky’s fourth straight world title in the event. She has set or broken the world record six times and has posted the nine fastest 1,500 times on record.

Just 15 hours after the loss to Titmus, Ledecky returned to Nambu University Municipal Aquatics Center on Monday morning for the 1,500 heats, where she posted the fastest qualifying time (15:48.90). It’s a great mark for any other swimmer, but it was not the dominant rebound swim Ledecky perhaps sought. At the world championships four years ago, Ledecky broke the world record in the qualifying heats with a time of 15:27.71. The next day she broke it again in 15:25.48.

Meehan said her labored finishes in Sunday’s 400 final and Monday’s 1,500 heat concerned team officials, and Ledecky met with medical staff following her last swim.

Ledecky had planned to swim in five events — a total of more than 6,200 meters — at these world championships, the last big international meet before next summer’s Tokyo Olympics. She had been pleased with her training and had hoped to match her haul of five gold medals from the 2015 and 2017 world championships.

With Tuesday’s races wiped out, Ledecky still could have two more events on tap: the 4x200 freestyle relay final, which is Thursday, and the 800 freestyle, which begins Friday with qualifying heats.

“This is just brutal for her, not to be competing, I’m sure,” Meehan said. “She’s such a tough competitor. She wants to be here, she wants to represent Team USA, and we hope that she gets the opportunity to do that as soon as possible.”

Even before Tuesday’s surprising announcement, the week had forced Ledecky into uncharted territory. Losing a signature race was unfamiliar, and rebounding from disappointment was mostly foreign.

No swimmer, of course, is invincible — not forever, at least. Michael Phelps might have been unbeatable in 2007 and 2008, but he also retired with seven individual silver medals and a bronze from his 11 trips to the Olympics and world championships.

“You look back at Michael’s career,” Meehan said. “Some ups and downs, some wins and losses, always learning from each experience.”

Ledecky’s experiences have been overwhelmingly positive, and she has made domination look routine. She has faced no serious injury, has been dealt no major setback. Most elite swimmers — virtually every other Olympic champion — are somewhat accustomed to losing a big race on a big stage at some point, dusting off the disappointment and pulling themselves back up.

Ledecky has been in a league of her own. In major international competitions — the Pan Pacific championships, world championships and Olympics — she had competed in 23 individual races entering this week. She had finished in first place 21 times, her only losses coming at 200 meters each of the past two years.

She entered this week with 14 world titles, the most of any female swimmer. Her 10 individual titles are tied with Ryan Lochte and trail only Phelps’s 15. It remains to be seen whether she will have a chance to add to her total here.

“We’re heartbroken for her because she had really come in in a great position, and hopefully we get to see that at some point this week,” Meehan said. “I don’t think you throw in the towel, but that remains to be seen. But she was absolutely prepared.”

Read more:

After tough loss, Katie Ledecky must recover and refocus at swimming championships

U.S. swimmer Caeleb Dressel wins the second of what could be a record world championship haul

After smashing vial, China’s Sun Yang brings scrutiny, controversy to swimming championships