Anderson trains under Vogt at USC, and Vogt is the U.S. open water head coach for these championships.
"She wanted to be out front and be smooth and strong and have some good closing speed and she did exactly what we talked about," Vogt said. "She felt like she wanted to take advantage of her event here."
At last year's London Games, Vogt was on Tunisia's staff and coached Mellouli to gold in the 10K.
Having started purely as a pool swimmer, Mellouli's sprinting ability is what sets him apart in the open water. That was evident as he surged ahead of an elite group of rivals as soon as he got within the ropes outlining the finish area.
"I was hoping they wouldn't stay with me," Mellouli said. "Once I put the jets on I was able to take off, finish the race and take the win."
Mellouli clocked 53 minutes, 30.4 seconds. Eric Hedlin of Canada took silver, 1.2 seconds behind, and five-time world champion Thomas Lurz of Germany finished third, 1.8 back.
Including the open water worlds, Lurz had won the 5K title seven consecutive times.
"I knew in the last 50 meters I would not win," Lurz said. "(Mellouli) swims the 100 free five seconds faster than me or more. This is the problem."
Besides the 10K, Mellouli also took bronze in the 1,500-meter freestyle in London to become the first swimmer to win medals in both the pool and open water at the same Olympics. And he won the 1,500 at the 2008 Beijing Games.
The 29-year-old Mellouli had planned to retire after the London Games but he changed his mind a few months later. He only began training again six months ago.
"This year was supposed to be a year off for me," he said. "So to come back here after a solid two months of training and to be on top of the world is quite exciting for me."