Chinese swimmer Chen Xinyi has failed a doping test at the Rio Olympics, the official Xinhua news agency reported Friday, citing the Chinese Swimming Association (CSA).

She tested positive for hydrochlorothiazide, a diuretic, on Sunday, it said. On that day the 18-year-old came fourth in the women’s 100m butterfly final — just 0.09 seconds away from a place on the podium.

Chen Xinyi at the Rio Olympics. Photo: Weibo/Chen Xinyi.

Chen has applied to the International Olympic Committee for her B sample to be tested and for a hearing, it added.

Diuretics increase urination rates and can be used as “masking agents” to hide the presence of performance-enhancing substances that are screened for in doping tests.

The CSA “resolutely opposes use of banned substances”, Xinhua cited it as saying in a statement.

“The CSA has taken this matter seriously and demanded full cooperation from Chen in the investigation,” it added. “We will cooperate with the Court of Arbitration of Sport during its investigation and will respect the final ruling by the CAS.”

Chen had been due to take part in the 50m freestyle heats later on Friday.

She first made the headlines when she won gold in the 100 metre butterfly and 50 metre freestyle events at the 2014 Asian Games, with times that set championship records.

China has already been embroiled in doping controversy in Rio after Australia’s Mack Horton called Sun Yang, China‘s most successful swimmer, a “drugs cheat” — inciting a social media firestorm and prompting a formal demand for an apology by Chinese officials.

Sun served a three-month doping ban in 2014, which was only announced retrospectively by Chinese authorities.

French swimmer Camille Lacourt waded into the row after Sun won gold in the 200m freestyle final, telling a French radio station: “Sun Yang, he pisses purple.”

In March, the CSA revealed that six Chinese swimmers had tested positive for drugs in the preceding months, including three for hydrochlorothiazide. Two of the six athletes were disciplined with only warnings.

Swimmers from other countries have also been caught up in disputes in Rio.

After American Lilly King beat tainted Russian rival Yulia Efimova in the 100m breaststroke final, she said: “I think it just proved that you can compete clean and still come out on top.”

US superstar Michael Phelps has demanded life bans for swimmers with a drug record.

An explosive report by the World Anti-Doping Agency (WADA) last year alleged a “state-sponsored” doping conspiracy across Russian sport.

It set off the biggest doping scandal in Olympic history, with world athletics chief Sebastian Coe this week blasting Moscow’s “cataclysmic failure” to protect athletes.

All but one of Russia’s track and field athletes were banned from Rio, but the International Olympic Committee decided to allow other Russians to compete at the Games, despite calls for the team to be banned outright.

AFP is a global news agency delivering fast, in-depth coverage of the events shaping our world from wars and conflicts to politics, sports, entertainment and the latest breakthroughs in health, science and technology.