Michael Sohn, Associated Press
FILE - In this Aug. 10, 2016, file photo, Ryan Lochte listens to the national anthem after being awarded a gold medal during the ceremony for the men's 4x200-meter freestyle relay final at the 2016 Summer Olympics in Rio de Janeiro, Brazil. A Brazilian court has dismissed the criminal case against U.S. swimmer Ryan Lochte, who had been charged with filing a false robbery report during the 2016 Olympics in Rio de Janeiro.

SAO PAULO (AP) — A Brazilian court has dismissed the criminal case against U.S. swimmer Ryan Lochte, who had been charged with filing a false robbery report during the 2016 Olympics in Rio de Janeiro.

The court confirmed in a statement this week that it tossed out the case after determining that Lochte's robbery claim made to NBC did not constitute the filing of a fake report, a crime punishable in Brazil by up to 18 months in prison.

"We are pleased that the court has finally dismissed the criminal prosecution against Mr. Lochte, while at the same time, appropriately recognizing that he committed no crime. It has been a long year, but in the end, justice prevailed," Jeff Ostrow, Lochte's Florida-based attorney, said in a statement to USA Today on Friday.

Ostrow did not immediately respond to a message seeking comment on Saturday.

Lochte told NBC last year that he and fellow swimmers Jack Conger, Gunnar Bentz and Jimmy Feigen were robbed at gunpoint in a taxi by men with police badges as they returned to the Olympic Village from a party Aug. 15.

Video captured by surveillance cameras showed the athletes getting into a confrontation with security guards at a gas station when their cab pulled over to let them use the restroom.

The six-time Olympic gold medalist later acknowledged that he was intoxicated and that his behavior led to the confrontation.

Lochte served a 10-month suspension from the U.S. national swim team for his behavior in Rio.

"It's been a long suspension but it's over," he tweeted on July 1. "I've learned and became a better man from it."