STUTTGART, Germany — Simone Biles broke the all-time record for most medals by any gymnast at the world championships by winning the balance beam and floor exercise Sunday.

Biles won her 24th medal on the beam, breaking a tie on 23 with the Belarusian men’s gymnast Vitaly Scherbo, and added her 25th less than two hours later.

Biles scored 15.066 on the beam after a near-flawless routine, opting for a simpler dismount than the double-double she performed earlier in the championships.

When her score was announced, guaranteeing the medal record, Biles leaped up from her seat with a broad smile and punched the air.

China took silver and bronze with Liu Tingting on 14.433 and Li Shijia on 14.3, respectively.

Biles won the floor exercise by a full point, scoring 15.133 despite a step out of bounds on one pass, and blew kisses to the audience after finishing her routine. Her U.S. teammate Sunisa Lee took silver, her third medal of the championships, while Angelina Melnikova took bronze for Russia.

Her winning routine came after a long wait when Brazilian gymnast Flavia Saraiva requested an inquiry into her score, during which time Biles sat on the edge of the floor.

Biles has won five events at these world championships after team gold Tuesday, individual all-around gold Thursday and vault gold Saturday.

A fifth place on uneven bars Saturday ended Biles’ chances of winning a medal in all six events, which she did last year in her comeback world championships after a sabbatical in 2017.

Biles hasn’t confirmed whether she’ll continue to compete after next year’s Olympics, so this could be her last world championships.

Of her 24 career world medals, 18 are gold, against 12 of 23 for Scherbo.

Earlier, Russia’s Nikita Nagornyy won the men’s vault for this third gold medal of the championships. He’s the first European man to win the vault since 2010.

Nagornyy scored an average 14.966 from his two vaults, beating his friend and Russian teammate Artur Dalaloyan into second place. The bronze went to Ukraine’s Igor Radivilov.

The 38-year-old Romanian Marian Dragulescu, a four-time world champion, secured qualification for his fifth Olympics by placing fourth.

Britain won its second gold of the championships as Joe Fraser scored 15 points to win on parallel bars. Ahmet Önder was second for Turkey, with Japan’s Kazuma Kaya third. Max Whitlock won Britain’s first gold medal Saturday on pommel horse.