U.S. Olympian Michael Phelps gave a swimming class Tuesday to Brazilian tots and teens in a rough Rio de Janeiro neighborhood that until two years ago was occupied by drug-trafficking gangs.

Phelps, winner of 22 Olympic medals, visited the Olympic Center in Complexo do Alemão, a group of shantytowns seized in November 2010 from drug traffickers in a vast operation of soldiers and police.

The Olympic champion showed some 20 youths a series of warm-up exercises during a half-hour session sponsored by a credit-card company.

Phelps has a foundation in the United States that promotes swimming as well as healthy living habits in general.

The champion later gave a press conference, in which he did not discount the idea that his foundation might open an office in Brazil, since his "philosophy" is to spread it beyond the borders of the United States.

Phelps, on his first visit to Rio de Janeiro, said he was "impressed" with the city, which is to host the 2016 Olympics.

The swimmer, who announced his retirement from competitions after the London Games, joked about the possibility of taking part in the Rio Games as a golfer.

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino