"This was a situation that could and should have been avoided. I accept responsibility for my role in this happening and have learned some valuable lessons."
The situation raises questions about the future for Lochte, who is planning to take time off from swimming but wants to compete in the 2020 Tokyo Olympics.
The saga has deeply hurt Brazilians, who were eager to prove they could get street crime under control and host a safe Olympics.
And it overshadowed the efforts of US Olympians, who have dominated the medal count. Swimmers alone piled up 16 golds and 33 medals in total at the games.
Lochte has always been about having fun. He has gleefully admitted eating McDonald's three times a day while winning four medals at the 2008 Beijing Games.
For Rio, he dyed his dark hair white, not realising the pool's chlorine would turn it light green.
His memorable props - diamond grills on his teeth on the medal podium, brightly coloured shoes, sunglasses bearing his favorite made-up expression of "Jeah!" - and easy-going, goofy nature have made him a popular star with the public and his teammates.
Lochte's success led to his own 2013 reality TV show called What Would Ryan Lochte Do? It had a short run. Still, lines for his autograph sessions at swimming events routinely stretch longer than anyone else's.
As hard as he plays, Lochte works hard too. His 12 Olympic medals are second only to Michael Phelps among US male Olympians.
This time Lochte was only a small part of the show. He finished fifth in his only individual event and swam on the victorious 4 x 200-metre freestyle relay.
Instead, the biggest memory of the 32-year-old swimmer in Rio will be the grainy security video of him and team-mates Gunnar Bentz, Jack Conger and Jimmy Feigen exiting the service station toilet and sitting on the ground, one with their hands up.
USA Swimming is expected to convene its executive board to discuss likely punishment, as it did when Phelps was arrested for a second driving under the influence incident two years ago.
Technically, the quartet could be fined, suspended or expelled.
In the Phelps case, the board announced a week after the arrest that it was suspending the sport's biggest star for six months, banning him from competing in the 2015 world championships and taking away six months of funding.
That was Phelps' third strike. This is Lochte's first major gaffe, and whatever sanctions the national governing body passes down could have little effect on the professional swimmer. He's already said he plans to take the first extensive break of his career following the Olympics and move from North Carolina to California.
As for the other three, Feigen has indicated he would retire after Rio and the 26-year-old is looking forward to attending law school somewhere in Texas. His attorney said he would make a $10,800 payment to a Rio charity that teaches martial arts to poor children after the incident, and was expected to leave the country shortly.
Bentz and Conger stumbled just as they were getting started on the international stage, so the repercussions could linger longest with the Olympic rookies. They have returned to the US and are set to continue their amateur careers while at university.
"While we are thankful our athletes are safe, we do not condone the lapse in judgment and conduct that led us to this point," USA Swimming executive director Chuck Wielgus said. "It is not representative of what is expected as Olympians, as Americans, as swimmers and as individuals."
- Agencies