By Alan Baldwin

RIO DE JANEIRO (Reuters) - It is safe to say Michael Phelps has no need for a lifeguard watching over him in the Olympic pool but the most decorated Olympian of all time, with 18 gold medals among his career haul of 22, will have one anyway at the Rio Games.

And so will the rest of the world's greatest swimmers in a situation that has caused some mirth in the run-up to the competition.

"It is a Brazilian law that any public pool over a certain size has to have lifeguards," Ricardo Prado, the sport manager for aquatics, told Reuters.

"We wish we didn't have them either (at the Games) but we have to have them."

All are certified, men and women with red and yellow uniforms and equipped with whistles and floats.

But, stargazing from some of the best seats in the house, they are undoubtedly less stressed than watching over their usual crowd.

"It's really one of the funniest things I've seen in the Olympic Games so far," New Zealand swimmer Matthew Stanley told reporters after a training session.

"Have any of you guys been to Bali before? You see the lifeguards and they sit up on the tower drinking Bintangs (beer) all day. That's what it reminded me of.

"If anyone has a heart attack, you're going down."

The main pool was closed to training on Friday as divers checked underwater cameras for Saturday's opening heats and medal round but some swimmers still had a chuckle.

"After the warm-up this morning it was pretty insane, I could have imagined that a lifeguard might have been needed to be used," grinned Tamsin Cook, at 17 the youngest swimmer on the Australian team, as she left a crowded training pool.

"But yeah, it is quite funny."

Britain's Jazz Carlin, heading back to the village after a workout, told Reuters she had not even noticed the lifeguards but was quite used to them in England.

"It's a bit different. I guess it's always nice to have someone watching," she said.

"We train at the university pool (in Bath) and the public can come in as well so they make sure they have got lifeguards there."

For the record, no swimmer in Olympic history has ever needed rescuing, not even Equatorial Guinea's Eric 'The Eel' Moussambani who enchanted, amused and worried spectators at the 2000 Sydney Games.

Moussambani had only started swimming months before the Olympics in a 20 meter hotel pool and could practice only once a week because he could not afford the fee.

He struggled in the 100 freestyle, almost stopping in the water, but made it to the end. Unassisted.

(Editing by Peter Rutherford)