TOKYO — A week later, Simone Biles still couldn't figure it out. She had no idea why her body and mind went their separate ways, leaving her unable to perform gymnastics routines that had once been second nature.

Biles was seeing doctors every day, hoping she might be able to salvage an uplifting end to the Tokyo Olympics. Tuesday, she got the curtain call she craved, winning a bronze medal on balance beam. As gymnastics wrapped up its 11-day run at the Summer Games, Biles earned her seventh Olympic medal with one of the most courageous performances of her career.

After withdrawing from the team final following one event — and scratching from the next four individual events — Biles received medical clearance to compete on beam. She still cannot twist, so she changed her dismount to a simple pike. Her routine was good enough to score a 14.000, giving her the bronze behind China's Guan Chenchen and Tang Xijing.

"It meant the world to be back out there," Biles said. "I wasn't expecting to walk away with a medal.

"I did this for me, and me only. I just went out there and had fun."

Biles, 24, was expected to be one of the biggest stars of the Tokyo Games. Following a five-medal performance at the 2016 Rio Olympics, she pushed the boundaries of her sport, dominating and innovating as few others have.

She was expected to build on that legacy in Tokyo. Instead, she became the latest high-profile athlete to speak publicly about mental health issues. Biles introduced the general public to a new term: "the twisties," a condition in which a gymnast is unable to fully control their body as they flip and twist in the air.

On Tuesday, Biles explained that the twisties hit her the morning after the Olympic preliminaries. She said "the wires just snapped" without warning while she was practicing her floor exercise routine.

"My body and my mind weren't in sync, and that's what I couldn't wrap my head around," Biles said. "It was really hard, because I trained my whole life. I was physically ready, and then this happens.

"It's something that was so out of my control. But my mental and physical health mean more than any medal. So I couldn't be mad."

During the team finals, Biles' poor landing on vault showed the danger of trying to fight through the condition. She watched the rest of the event from the sidelines, then went back to the gym to try to get her body and mind working together again.

At one practice, Biles said, she had "the biggest mental breakdown" and could not breathe. She worked with a sports psychologist and was evaluated by doctors every day.

Because beam doesn't require any twisting, Biles held out hope she could return for that event. She got medical clearance Monday night.

Biles didn't complete one of the connections in her routine and had a small hop on her double pike dismount, but those minor mistakes were beside the point. Afterward, she got a big hug from teammate Suni Lee, then waved to groups of athletes and officials in the stands.

"At the end of the day, we're not just entertainment. We're humans," Biles said. "I think people forget that. They have no idea what's going on behind the scenes."

Biles understands the power she has, as one of the world's greatest athletes talking about her frailties. She hopes the public can have more compassion for the pressures athletes face, instead of expecting them to push everything aside and perform.

She is not ready to commit to continuing on to the 2024 Paris Olympics. "I have to go home and work on myself, and be OK with what's happened," Biles said. "The support of the girls and everybody out there has meant the world to me."

Her coach, Cecile Landi, said Biles' actions during the Olympics will mean the world to others.

"She opened the door to so many athletes to say, 'You know what, I'm not OK. I need help,' " Landi said. "That's better than any medal she could have won."

Complete coverage from Tokyo on our Olympics page