Olympic swimmers have caused a storm by calling out Rio competitors who have previously been banned for returning positive drug tests.
Australian swimmer Mack Horton dismissed Chinese simmer Sun Yang, who was banned for three months for taking trimetazidine, as a drug cheat.
US swimmer Lilly King labelled her competitor Russian Yulia Efimova the same.
The Russian had tested positive for low concentrations of the banned substance meldonium but was cleared to compete at Rio.
What are the drugs athletes take to improve performance and how do they work?
Anabolic steroids, a catch-all term for male hormones, are the oldest and still the most widely used banned drugs in sport — nearly half of banned substances detected in drug tests are steroids.
Testosterone is the most recognised doping steroid — it was first made in 1935 to treat men deficient in male sex hormones.
The World Anti-Doping Agency (WADA) bans any drug that increases testosterone.
Steroids build muscle size and strength and reportedly let athletes train and compete harder and recover more quickly from intensive training.
These strength and endurance-building properties mean Olympic weightlifters, athletes and cyclists most often test positive for steroids.
Canadian sprinter Ben Johnson was stripped of his 100-metres gold medal at the 1988 Seoul Olympics when steroids were found in his urine sample.
The ban on steroids has led athletes to use a range of drugs that indirectly increase testosterone levels by stimulating cells to produce more of it in the body.
These agents, together with “designer steroids” made specifically for doping athletes, are difficult to detect because they act on the the body in different ways to naturally occurring steroids.
Athletes will also use smaller, repeated doses to avoid testing positive, and stop doping before competition.
But out-of-competition testing, which athletes are subject to at any time without warning, has made this tactic more risky — and more sensitive testing has identified athletes using low-dose doping regimens.
Ken Fitch, former Australian Sports Drug Medical Advisory Committee chairman, said more sophisticated testing technology was part of the reason for positive tests recently identified from samples taken during the Beijing and London Olympics.
Steroids can have serious side effects on liver and heart function, and fertility.
Muscles need oxygen to function and if athletes can increase the concentration of oxygen in the blood, they can increase their endurance levels.
One way of doing this, which is not banned, is altitude training.
At high altitudes, the air has less oxygen.
The body compensates by producing more red blood cells, which means the muscles get more oxygen.
Athletes initially used the dangerous practice of “blood doping” to increase red blood cell numbers, a method first used in the 1970s and still banned by WADA.
They donated a quantity of their own blood a few months before competition, stored it and then re-infused it before competing.
But then synthetic oxygen-boosting drugs came along, the best known of which is the banned substance erythropoietin.
Erythropoietin initially proved very difficult to detect in doping athletes because it closely matches the hormone naturally occurring in the body.
Not only that, but it disappears from the body within a few days.
A test developed in Australia was first used at the 2000 Olympics in Sydney to identify erythropoietin in urine, but it did not identify any positives.
But the Australian experts from the Institute of Sport had also developed another method that could identify athletes who had used erythropoietin weeks before — by looking at how indirect markers in their blood had changed.
Now anti-doping authorities find blood dopers by looking for abnormalities in indirect markers of blood doping in samples taken from athletes over time, called the athlete’s biological passport (ABP).
In June this year, Australian Olympian Jared Tallent was awarded the gold medal for the 50-kilometre walk in the London Olympics after Russian Sergey Kirdyapkin, who finished first, was disqualified following an abnormal ABP.
Cycling and athletics are the sports where hormones that increase oxygen supply are most often detected.
Blood doping can cause heart attacks and stroke and many athletes have died after using erythropoietin.
Scientists worked out how to make growth hormone to treat children with growth deficiencies.
Athletes take growth hormone and other growth factors because they reportedly boost muscle mass and power.
But there is little clinical evidence these effects are real and growth hormone is most often used in a cocktail of drugs with steroids.
Growth hormones are very hard to detect because they are present in the blood and urine at very low levels and disappear quickly from the bloodstream.
A growth hormone test was first used at the Beijing Olympics in 2008 and Russian powerlifters Nikolay Marfin and Vadim Rakitin were disqualified before the London 2012 Paralympics when they tested positive for it.
Side effects of growth hormone include high blood pressure, heart disease and diabetes.
WADA also bans a range of drugs that alter metabolism.
WADA has banned a series of drugs they call “masking agents”, which make other banned drugs harder to detect.
Some masking agents act by stopping particular drug products forming in the urine.
Plasma expanders work by increasing the volume of blood, which hides erythropoietin or other red blood cell boosters.
Diuretics, which boost urine production, are also classed as masking drugs.
They were originally banned because they were thought to dilute the concentration of banned drugs in urine.
This is less of a concern with more sensitive drug detection, but diuretics are still banned because they can cause fast weight loss in sports like boxing and weightlifting.
Such weight loss would let an athlete unfairly compete in a lower weight category.
Australian Olympic team wrestler Vinod Kumar was suspended for four years last month following a positive drug test and will not compete for Australia in Rio.
According to media reports, he reportedly tested positive for a diuretic
Uppers and downers
Stimulants like amphetamines and cocaine can improve endurance, increase alertness and make athletes less tired.
Mixtures of stimulants, including the poison strychnine, heroin, cocaine and caffeine, were used by athletes until the 1920s.
They are all banned by WADA, except for caffeine.
Likewise, drugs that have a calming effect are also banned, but only in particular sports.
Beta-blockers are drugs that control heart rate, hand tremor and anxiety, an advantage in any sport where a steady hand is important.
They are banned in archery and shooting, though only during competition, not in training.
North Korean shooting double medallist Kim Jong-Su was stripped of his medals at the 2008 Beijing Olympics after he tested positive for a beta-blocker.
Chinese swimmer Sun Yang served a ban for taking trimetazidine, which the World Anti-Doping Agency previously classified as a stimulant but is now classed as a metabolic modulator.
It is used to treat angina, a heart condition that causes chest pain through lack of oxygen.
In athletes it improves their oxygen use.
Gene doping is the new frontier of doping in sport.
The idea is that a gene is transferred into the cells of the body to change the levels of genes and therefore proteins — to improve performance.
Gene therapy was developed to replace defective genes or proteins in people who have genetic diseases.
Erythropoietin is an obvious target for gene doping and a genetically modified erythropoietin to treat anaemia in cancer patients has already been developed.
It works by adding a modified erythropoietin gene to the patient, which responds to low oxygen concentrations in the blood.
Gene doping is very difficult to detect because the introduced genes cause proteins to be expressed that are very similar to those the body produces naturally.
But putting foreign genes into the body irreversibly alters body chemistry and is fraught with risk.
WADA bans all forms of gene doping even though there is no test for it.
Professor Fitch said that without a test to detect gene doping, it was impossible to know if athletes were already doing it.