The US swimmer Michael Phelps has been suspended from competition for three months after photographs were published appearing to show him smoking cannabis.
USA Swimming, the sport's governing body in the US, said no "anti-doping rule" had been violated.
But the federation said it wanted to send a strong message to Phelps because he had disappointed so many people.
Phelps won eight gold medals at the Beijing Olympics and has been feted as one of the world's greatest athletes.
The ban will end in time for him to prepare for the US Championships on 7 July, which act as a trial for the World Championships in Rome two weeks later.
Phelps, 23, was caught on camera inhaling from a type of glass pipe which can be used for smoking cannabis.
The photo, which appeared in Britain's News of the World newspaper, was said to have been taken at a student party last November when Phelps was on a long break from training.
The Olympic star has apologised for his "regrettable behaviour", but did not say whether he had taken drugs.
USA Swimming said in a statement: "This is not a situation where any anti-doping rule was violated.
"But we decided to send a strong message to Michael because he disappointed so many people, particularly the thousands of USA Swimming member kids who look up to him as a role model and a hero.
"Michael has voluntarily accepted this reprimand and has committed to earn back our trust."
USA Swimming has cut off its financial support to Phelps for the same three-month period.
Cereal and snack firm Kellogg has also reportedly said it will not renew a sponsorship contract with Phelps, on the grounds his behaviour is "not consistent with the image of Kellogg".
Swimming's governing body Fina and the International Olympic Committee have both accepted his apology.
Phelps' coach, Bob Bowman, told the Baltimore Sun newspaper: "I think it sends a message to Michael, and we're certainly going to abide by it.
"He's eager to be back in training, and looking to move forward."
Phelps used an interview with his hometown newspaper on Thursday to admit that he had "clearly made a mistake", but denied that he used marijuana regularly."This was stupid, and I know this won't happen again," added Phelps. "It's obviously bad judgment, and it's something I'm not proud of at all."