Olympic superstar Michael Phelps says drug cheats should not be allowed back into sport after doping rows clouded the opening days of the Rio Olympics.

Key points: Michael Phelps says athletes caught using drugs should be banned for life

Michael Phelps says athletes caught using drugs should be banned for life Mack Horton raised ire of China by criticising Chinese Rio gold medallist Sun Yang

Mack Horton raised ire of China by criticising Chinese Rio gold medallist Sun Yang US Lilly King in row with Russian competitor

Phelps said "it breaks my heart" after controversy over athletes who have previously failed drugs tests broke out at the Rio swimming competition.

"You're probably going to see a lot of people speaking up more. I think something needs to be done," Phelps said.

"It's sad that today in sports in general, not just only swimming, there are people who are testing positive who are allowed back in the sport — and multiple times.

"It breaks what sport is meant to be and that's what pisses me off."

Australia's Mack Horton taunted Chinese swimmer Sun Yang about his 2014 drugs ban, drawing a furious response from Chinese officials and media.

Sun secretly served a three-month ban after testing positive for trimetazidine, which Chinese officials said he had taken for years to treat an existing heart problem before the stimulant was added to World Anti-Doping Agency's banned list in January 2014.

Phelps was speaking after young team-mate Lilly King made it clear she did not think Russian Yulia Efimova should be competing in the Rio Games.

King backed up her comments with a 100m breaststroke victory over world champion Efimova, who has served a 16-month steroid ban but was allowed to swim in Rio despite this year testing positive for meldonium, the drug which Maria Sharapova has been banned over.

"I believe sport should be clean and sport should be on an even playing field, and I think that it's sad that in sports today we have people who are testing positive not only once but twice and still having the opportunity to swim at this Games," Phelps said.

"I wish somebody would do something about it."

King spoke of her solidarity with Horton's stance.

"I completely agree with him. This is one for the good guys. A 1-3 finish for the USA," she told Channel Seven.

"We're competing clean and we're going to stay that way. It's still going to bring us success in the pool."

Australian swimmer Mack Horton has been trolled online after criticising Sun Yang. ( AP/Reuters )

King, a 19-year-old first-time Olympian, had made it clear she did not think Efimova belonged in the pool, and plenty agreed as the 24-year-old world champion was showered with boos as she took the blocks.

After an earlier race, Efimova wagged her finger at King and the American told NBC: "You're shaking your finger [for] number one and you've been caught for drug cheating. I'm just not a fan."

In the final, King led at the turn and repelled a late Efimova charge to win in an Olympic record of 1:04.93, with the Russian second in 1:05.50.

"I think it just proved that you can compete clean and still come out on top," King said, adding she had no regrets about her comments about Efimova.

"I'm actually glad I made a statement, and I ended up coming out on top in the race."

American Lilly King claimed victory over Yuliya Efimova, after criticising the Russian over a doping ban. ( Reuters: Dominic Ebenbichler )

King was also asked about whether compatriot and sprinter Justin Gatlin, who also has two past doping offences, should be taking part in Rio.

"Do I think people who have been caught for doping offences should be on the team? No, they shouldn't," she said.

Gatlin tested positive in 2001 for an amphetamine contained in a medication he had taken for attention deficit disorder (ADD).

The 2004 Olympic gold medallist and 2005 world champion then failed a test for the banned steroid testosterone in 2006.

Revelations of state-sponsored doping in Russia have dominated the build-up to the Rio Olympics and increased pressure on athletes and officials to take a stand on the divisive issue.

AFP/Reuters