STUTTGART, Germany — Simone Biles really knows how to close out a show.

Biles became the most-decorated gymnast, male or female, at the world championships Sunday, winning gold on balance beam and floor exercise. Those were her 24th and 25th medals at worlds, surpassing the previous record by Vitaly Scherbo.

Scherbo, who competed for the Soviet Union, Unified Team and Belarus at five world championships, had 23. Though he had two more events in which to collect his medals, mind you.

There was no mic drop when Biles finished floor, as she did to close out the all-around. Instead, she flashed a huge smile and blew kisses to the crowd. Coach Laurent Landi clapped his hands over his head, then gave her a big hug as she came off the podium.

She leaves worlds with 19 gold medals, extending her own record. It's the first time she's won five golds at the world championships, and will no doubt spark talk of her doing the same at next summer's Tokyo Olympics.

American teammate Sunisa Lee was the silver medalist on floor.

Biles had tied Scherbo on Saturday by winning the vault title. When she saw her score on beam, a 15.066, a huge grin spread across her face and she jumped out of her seat. She threw a roundhouse punch before exchanging high fives and a hug with coach Laurent Landi.

And with the record came a bit of redemption.

Biles was the world champion on the event in 2014 and 2015. But a mistake on beam at the Rio Olympics — her foot slipped on the landing of a front tuck and she had to grab the beam to keep from falling off — shook her confidence.

A wobbly routine at last year’s world championships didn’t help. She was the bronze medalist in both Rio and at last year’s worlds.

“I was like, 'I guess I’m just never going to do well on beam again,' " Biles told USA TODAY Sports on Friday in an exclusive interview.

But Cecile Landi, who coaches Biles with her husband, Laurent, and is responsible for beam, helped Biles regain her swagger. She was the most consistent gymnast on the event, posting the highest score in qualifying, team final and the all-around.

“My main goal is to go out there and compete beam with confidence, and hopefully do well in that event because I know how strong I am,” Biles said. “Even though I got a bronze, I’m hoping for a little bit better because I know I’m capable of it.”

She got the upgrade, and the record to go with it.