Katie Ledecky is always there in the end, her endurance powering her to the wall well ahead of the competition.Someone else got there first at the world championships on Sunday night. Ariarne Titmus of Australia chased down Ledecky over the last lap to win the 400-meter freestyle and deny the American star a record fourth straight title. It was Ledecky’s first defeat in the event at a major international meet since 2013.Titmus overcame a 0.62-second deficit going into the last lap and won by 1.21 seconds over Ledecky. The 18-year-old Aussie touched in 3 minutes, 58.76 seconds. Ledecky was second in 3:59.97 – well off her world record of 3:56.46 set at the 2016 Rio de Janeiro Olympics. American Leah Smith took bronze in 4:01.29.Ledecky had the slowest last lap of anyone in the eight-woman final. Titmus went 1.83 seconds faster over the last 50 meters. Titmus led through the first 200 meters – dipping under world-record pace on the first lap – before Ledecky moved in front with 250 meters to go. The American was still ahead turning for home. But the 18-year-old Australian pulled even midway through the last lap and surged to the wall first. China’s Sun Yang was able to do what Ledecky could not: win his record fourth consecutive title in the men’s 400 free. Rival Mack Horton of Australia rallied to finish second in the first final of the night.Sun worked his way from fifth to first and then easily kept Horton at bay over the last lap.Sun touched first in 3:42.44. Horton took silver in 2:43.17, while Gabriele Detti of Italy earned bronze in 3:43.23. Sun climbed on the lane rope and waved four fingers on each hand in celebration. He pounded the water and was the last swimmer to leave the pool. Sun got out and thrust his arms in the air to screams and cheers from Chinese fans, who hung banners featuring his face from the stands.Sun won his other 400 free titles in 2013, 2015 and 2017.Sun’s presence at the world meet has drawn the ire of some swimmers, including Horton and American Lilly King. The Aussie is the only swimmer to beat Sun in the last eight years, taking gold in the 400 free at the Rio de Janeiro Olympics in 2016. That’s when Horton called Sun a “drug cheat” for his three-month doping suspension in 2014.Olympic breaststroke champion King was critical of FINA, the sport’s world governing body, for allowing Sun to compete at worlds.“That’s really sketchy and pretty insane,” she said Friday.On the medals podium, Sun and Horton didn’t shake hands. Sun and Detti joined together on the top spot for photos but Horton didn’t join them. Instead, he stood in his position a bit lower than the gold medalist.Asked what his overriding emotion was, Horton replied, “Frustration. I think you know in what respect.”Sun is currently facing alleged doping rule violations that risk a ban from the 2020 Tokyo Olympics and he has requested a public trial at the Court of Arbitration for Sport in September to defend himself.The World Anti-Doping Agency is challenging a decision by FINA, swimming’s world governing body, merely to warn him over incidents during a doping control team’s attempts to take blood and urine samples at his home in China last September, while allowing him to continue competing.In the men’s 4×100 freestyle relay, Nathan Adrian anchored the Americans to a victory seven months after announcing he had been diagnosed with testicular cancer. Their time of 3:09.06 was a championship record, lowering the mark of 3:09.21 set by the U.S. in 2009 during the high-tech suit era. The women’s 4×100 free relay went to Australia in 3:30.21, also a championship record. The U.S. took silver and Canada earned bronze.Adam Peaty of Britain became the first man to go under 57 seconds in the 100 breaststroke.He won his semifinal heat in 56.88 seconds, bettering his old world record of 57.10 set last August in Glasgow, Scotland. Peaty is seeking his third straight world title in the event. He also won the 100 breast at the 2016 Rio de Janeiro Olympics. The final is Monday night.