SHANGHAI (AFP) - US great Michael Phelps Friday warned he was coming back into form for the Shanghai world championships as China stood on the verge of a historic sweep of the diving medals. Phelps said he was out to avenge some stinging upsets this year, including two 200m butterfly losses to China's Wu Peng which ended a nine-year winning streak that the American had hoped to continue until retirement. The 14-time Olympic champion, 26, will be the star attraction in the pool events from Sunday as he kick-starts his campaign for London 2012, which he insists will be his last Games. "I think the last six to eight months have been really good, leading up to this, being able to have some solid training, some consistent training," Phelps said. "Having those races (against Wu) happen earlier in the year hopefully I was able to learning something from them and I can swim faster here," he added. Excitement is building for the swimming events, which were boosted when Brazilian sprint champion Cesar Cielo was cleared to compete despite testing positive for a banned diuretic. The Court of Arbitration for Sport let Cielo, 24, off with a warning on Thursday, dismissing calls by world governing body FINA for a three-month ban. Brazilian officials hoped the row would not affect the Olympic champion as he prepares to defend his 50m and 100m titles. "We don't know," a spokeswoman told AFP, when asked if Cielo was confident of victory. "After all this we don't know but we are there to support him." Meanwhile defending titleholder He Chong sealed China's eighth gold medal of the championships Friday as the hosts drew tantalisingly close to winning all 10 events. Team-mate Qin Kai was vying with He for the title until he slipped on his fifth dive and crashed into the water, a rare mistake which left him out of the medals in fourth place. "I feel really sad, because I have trained very hard over the years. Maybe it is a precious experience for me," said a downcast Qin. "As for next year's London Olympics, my goal remains the same -- the gold medal." Until Qin's mishap, China had enjoyed a one-two in every individual diving event, underscoring their total dominance of the discipline in which they won seven golds at the 2009 worlds and seven of eight at the Beijing Olympics. Chinese diving icon Wu Minxia topped the semi-finals of the women's 3m springboard and will expect to add to her giant personal tally in the final on Saturday. Earlier, Germany's Thomas Lurz was hailed as an all-time great as he sealed his fifth world championships open water title in a dramatic 5km race at Jinshan City Beach. Lurz left it desperately late before overhauling Greek rival Spyros Gianniotis in the final metres of the gruelling event. "I was sure that I won only when I touched the finish board, the slap board. Then I already knew that I won," Lurz said. "But before the race I didn't think about winning five times or six times or seven times in a row. I think this is big pressure. Every time I go on the start, I try to do my best and don't think about the number of titles." Bronze medallist Evgeny Drattsev of Russia said Lurz, who also won the event in 2005, 2007 and 2009 -- when he also won the 10km -- had proved himself as one of the great athletes. "Lurz is a very strong swimmer. He is a great athlete in history," Drattsev said. In the women's event, Switzerland's Swann Oberson took gold with Aurelie Muller claiming France's first medal of the world championships and American Ashley Twichell taking bronze.