Michael Phelps, Katie Ledecky

The world was spoiled Sunday night. Two of the best ever to enter the pool -- Michael Phelps and Katie Ledecky -- were at their best in Rio.

Ledecky broke her own world record in the 400-meter freestyle at 3:56.46. The previous record was 3:58.37.

Ledecky, 19, also holds the world record in the freestyle for 400 and 800 meters.

Ledecky won by nearly five seconds, with Jazmin Carlin of Britain finishing at 4:01.23. American Leah Smith won bronze at 4:01.92.

Ledecky, who won gold in the 800 in 2012 and silver in the 4x100 freestyle relay Saturday, races in the 200 freestyle, with two qualifying heats Monday and the final on Tuesday.

After Ledecky's golden swim, Phelps, the most-decorated Olympian of all time, hopped in the water with the U.S. 4x100 freestyle relay team. No event in Phelps' career has had such a colorful history. In 2004, Phelps won bronze. In 2008, this was one of Phelps' eight golds in Beijing, thanks to a dramatic anchor leg by Jason Lezak. But in 2012, it was Yannick Agnel and France pulling past Ryan Lochte and the U.S. on the final swimmer to give Phelps a silver.

Related: Canadian Swimmer Flips Off Dad Before Race

Phelps, racing in the No. 2 slot, as he did in Athens and London, swam his best 4x100 leg in his four Olympics. Clocking 47.12, Phelps jumped the U.S. from second to first, past France, and the team would not look back. His turn reminded the world why Phelps is the GOAT.

How does he glide that far off the wall?

Just when the world thinks Michael Phelps is on the decline, he does that. Phelps' 47.12 spilt was a personal best. He is 31.

Phelps, who has never competed at the 100 freestyle individual competition at the Olympics, swam the evening's fourth-fastest race, behind the anchors of the three medalists. U.S. anchor Nathan Adrian, the reigning 100 freestyle Olympic gold medalist, swam the best time of 46.97.

Phelps' gold medal is his 19th, and he now has 23 total medals. Both are Olympic records. Phelps' next two events are the 200 butterfly, which holds its two qualifying heats Monday and final Tuesday, and the 4 x 200 freestyle relay, which holds its qualifying heat and final Tuesday. Phelps is expected to only participate in the final.

More Olympics:
-- Refugee Olympic Team Gets Opening Ceremony's Loudest International Ovation
-- Tongan Flag Bearer Pita Taufatofua Oils Up Opening Ceremony
-- Carmelo Anthony: Why He's Better Player In Olympics Than NBA

-- Follow Jeffrey Eisenband on Twitter @JeffEisenband.