IRVINE, Calif. — Kathleen Baker had settled for a first-place tie in the 200-meter backstroke. In the 100 back, she wanted the attention for herself.

Setting a world record guaranteed it.

The 21-year-old Olympian won in 58.00 seconds at the U.S. national championships on Saturday night, lowering the world mark of 58.10 set by Kylie Masse of Canada at last year’s world championships in Hungary. Baker finished second to Masse in Budapest.

“I’m sort of on cloud nine right now,” said Baker, known for keeping her goal times in her cellphone as a daily reminder.

“Right now it’s a 58.10 and I just broke that so now I’m going to put 57.99 down,” she said, laughing.

Baker also took possession of the American record, bettering the time of 58.33 set by Missy Franklin in 2012. Franklin didn’t enter the backstroke events at nationals after having surgery on both shoulders 11/2 years ago.

Katie Ledecky of Bethesda dominated the 400 freestyle, leading all the way to win by 3.12 seconds for her third victory of the meet after taking the 200 and 800 freestyles. She earned her 16th national long-course title, tying Natalie Coughlin for seventh on the career list.

Of course, Ledecky has a long way to go to equal or exceed Michael Phelps’ record 61 national titles.

“That’s super impressive,” she said. “I’ll have to keep swimming for like 20 years to be able to match that.”

Ledecky was under world-record pace through 250 meters with the crowd cheering loudly before she dropped off and finished in 3 minutes, 59.09 seconds. It was the 10th-fastest swim ever in the event, with Ledecky owning the other nine best times.

Baker was warming up when Ledecky was swimming her race.

“I said, `Kathleen, I think what the crowd needs tonight is a world record,’ and she said, `Yeah,’ ” her coach David Marsh said.