TOKYO — Gabby Thomas fully introduced herself to the world Tuesday night, even though she didn’t know it yet as she crossed the finish line in the women’s 200-meter final at National Stadium. A fraction of a second before, the 24-year-old American phenom first watched Jamaica’s Elaine Thompson-Herah finish first to win the gold medal and become the first woman to sweep the 100 and 200 meters in back-to-back Olympics.

Then she watched Christine Mboma rally from behind her to finish with a surprise silver medal, the first for a woman from Namibia.

“I had no idea if I was third, fourth or fifth,” Thomas said.

She knew this: She had dug as deep as she could to try to win. That gumption was rewarded with a bronze medal and confirmation that Thomas is indeed already one of the best sprinters in the world, someone who will be a force in the next Olympic cycle.

She finished in 21.87 seconds, a hair behind Thompson-Herah’s time of 21.53 — the second fastest in history — and Mboma’s finish of 21.81.

“I was at first in relief, then in shock, then in pure excitement,” Thomas said afterward while draped in an American flag. “It means a lot, because I really worked for that one. I fought tooth and nail for those last 30 meters. I did my best. I gave my best effort.”

The night ultimately belonged to Thompson-Herah, who had won the 100 and 200 in Rio de Janeiro in 2016, then followed with an Olympic-record win in the 100-meter final Saturday night, beating a 33-year-old mark set by Florence Griffith Joyner, widely considered to be the greatest sprinter ever. She was just 0.19 seconds off Griffith Joyner’s world record of 21.34 in the event.

Thompson-Herah pulled away from the pack as she made the turn for the final 100 meters, with Thomas and Jamaican teammate Shelly-Ann Fraser-Pryce holding in her wake. But the 18-year-old Mboma, who isn’t allowed to run her favored event in Tokyo, the 400, because World Athletics reportedly found high levels of testosterone this summer, surged past Fraser-Pryce and eventually Thomas in the final 30 meters to take silver, the first Olympic medal for Namibia since 1996. Fraser-Pryce finished fourth three nights after winning the silver in the 100 meters.

“Just being lined up with girls this caliber, in itself, that mind-set that I’m going for something even greater than I imagined, and now coming here and getting a bronze and just knowing I belong,” Thomas said.

Thomas had arrived in Tokyo hoping to challenge Thompson-Herah for the gold medal, a goal that wasn’t in her sights a little over a month ago. She just wanted to make the Olympic team. Then she showed up in Oregon for the U.S. trials in June and clocked a 21.61, which at that point was the second-fastest time ever in the event.

It was a seminal moment in the young career of Thomas, who graduated from Harvard with a degree in neurobiology and is studying public health in a master’s program with a focus on epidemiology at the University of Texas, near where she has been training and building herself into an Olympian.

“Gabby has been running amazing this whole entire season,” said 19-year-old Athing Mu, who won the gold medal in the 800.

Thomas still needs to finish registering for fall classes at Texas before the deadline — “I have to check on that; I’m hoping they might make an exception,” she said — but Thomas cemented herself as a legitimate contender in the 200 meters in the years to come.

The day before, Thomas finished second behind Mboma in her first heat. She then finished third in the second of three semifinals with a time of 22.01, which afterward forced her to watch the television in a tunnel underneath the stadium to make sure she qualified.

“Definitely getting inched out at the end was a little bit scary,” she said.

In the process, Thomas impressed her contemporaries, including Thompson-Herah, who for a second time in four nights, draped herself in the Jamaican flag and celebrated on the track. She had been struggling to sleep after the win in the 100 meters Saturday night, she said, but she pushed through.

While the 29-year-old Thompson-Herah has positioned herself to enter the conversation as one of the best sprinters of all time, Thomas is just getting started and figures to challenge an aging rival in major international events in the lead-up to the 2024 Paris Games.

After a year of changing expectations, and a resilient performance to secure her first medal Tuesday, Thomas’s goals are set for now. She wants to make every U.S. team. She wants to go to every major championship and win. And she now expects herself to return to the Olympics and win a gold medal, no matter who is in her way.

“I also want more for myself, and I want to come with the gold at some point,” she said. “So definitely looking forward to the next few years and being a different athlete.”