TOKYO — In her first medal event of the Tokyo Olympics, Katie Ledecky did not win, and the natural reaction from a casual fan to Ledecky finishing anywhere other than in first place might be surprise, or disappointment. Neither, in this case, is justified.

Ledecky did lose a lead and a gold medal Monday at the Olympics when Australia's Ariarne Titmus caught her down the stretch in the 400-meter freestyle to win one of the most dramatic competitions of the first week of the Tokyo Games.

Titmus' coach, Dean Boxall, did become the subject of a million memes about Whitesnake's rhythm guitarist or the evils of failed experimental party drugs when he writhed and exulted in the stands, even scaring away a volunteer who tried to calm him.

Titmus did become unquestionably the world's best in the event, becoming the first woman to beat Ledecky in an individual Olympic final.

So did Ledecky lose, or win?

Did she get upset, or beaten by someone who is at least her equal at this point in their careers?

Ledecky is a legend, but Titmus is a rising star.

Ledecky is 24. Titmus is 20. Titmus beat Ledecky in the 400 at the world championships in 2019, although Ledecky was ill at the time.

Titmus' time at her country's Olympic trials was much better than Ledecky's at the U.S. trials.

And beating Ledecky required a dramatic comeback from the younger swimmer.

The unbeatable athlete is an enduring myth, but it is a myth.

"Certainly a tough race," Ledecky said. "I think we delivered. You can't get much better than that. Tremendous race, a lot of fun. I can't be too disappointed with that. That was my second-best swim ever. I felt like I fought tooth and nail, and that's all you can ask for."

It was her second-best time ever in the 400 free, which should be specified and emphasized because Ledecky has more miles to swim.

After winning silver in the morning in Tokyo, she returned to the pool and swam the eighth-fastest 1,500 free ever (she has the other seven, too) and the fastest 200 free prelim of the day. She won her 200 free semifinal heat with a time of 1:55.34; Titmus topped the other heat in 1:54.82. The finals of both events are 73 minutes apart on Wednesday morning (Tuesday night Minnesota time).

While Ledecky's chance at an improbable perfect Olympics is gone, she joins the likes of Michael Phelps as all-time greats whose reputations weren't damaged by the occasional display of competitive vulnerability.

Phelps won two bronze medals in Greece in 2004 and two silvers in London in 2012. He need not be ashamed of them any more than Ledecky should be ashamed of getting overtaken by a rising star.

Plus, Ledecky doesn't have time to brood. As she spoke at a news conference after the race on Monday afternoon in Tokyo, she was looking forward to busing back to the Olympic Village, putting her "legs up" for a couple of hours, then heading back to the pool for her other events.

She's great enough that beating her unleashed disparate emotions. Titmus initially seemed unable to fully accept Ledecky's congratulations because she was overwhelmed. "It's the biggest thing you can pull off in your sport," Titmus said. "So I'm over the moon.''

Boxall pranced around in the stands, losing control of his emotions while Ledecky remained gracious. So did Titmus, who said that Ledecky's greatness inspired her.

"I'm proud of how I got to this point," Ledecky said. "It's never an easy journey to the podium. I had to overcome a lot of self-doubt. I think I just came into this race very much at peace with the work I'd put in to get to this point. I felt good going into it, felt confident, felt like I believed in myself. And I think that's the biggest win of all."

She won't need to search for moral victories for long. She will win gold at these Olympics. She will continue to pad one of the greatest résumés in swimming history.

And the American and Australian women will continue to forge a rivalry that promises to elevate the competition at these Olympics, and may occasionally cause a coach to dance like a jester.