Mayer, silver medallist at the last two Olympics, was sixth overnight but won the pole vault and javelin while his 10th-placed finish in the 1,500 metres – the final event – gave him a score of 8,816 points and his second world crown.
Canada’s Pierce LePage took silver with 8,701 points while American Zach Ziemek collected bronze with 8,676 points. Ayden Owens-Delerme of Puerto Rico, the overnight leader, finished fourth while defending world champion Niklas Kaul of Germany finished sixth.