Feigen and team-mate Ryan Lochte were accused of lying about being stopped by gunmen posing as police in Rio

The US Olympic swimmer Jimmy Feigen will pay $11,000 (£8,300) to a Brazilian charity to settle a dispute over what police called a fabricated story about him and his team-mates being robbed at gunpoint during the Rio Olympics.

The donation was announced by Feigen’s lawyer, Breno Melaragno Costa, after a four-hour meeting between the swimmer, a judge and officials from the prosecuting ministry in Rio, ABC News reported.

Feigen and his team-mate Ryan Lochte have been accused of lying about being stopped by gunmen posing as police in the early hours of Sunday while they were with two other US swimmers, Gunnar Bentz and Jack Conger.

The US Olympic Committee apologised for the actions of the swimmers, all of whom have returned to the US except for Feigen.

Brazilian authorities have accused Feigen and Lochte of making up a story about a robbery in an attempt to cover up an act of vandalism.

After the donation is paid to the Brazilian charity, Reaction Institute, Feigen is expected to have his passport returned and will then be free to leave the country, said his lawyer.

The announcement follows a whirlwind day on Thursday in which Brazilian police presented strong evidence contradicting the robbery allegations.

Bentz and Conger were pulled off a flight home the previous night as local authorities tried to unravel what actually happened, but a USOC statement released the next day appeared to agree with Rio police’s assertions that Lochte’s version of events were false.

“As we understand it, the four athletes (Bentz, Conger, Feigen and Ryan Lochte) left France House early in the morning of 14 August in a taxi headed to the Olympic village,” the USOC statement said.

“They stopped at a gas station to use the restroom, where one of the athletes committed an act of vandalism. An argument ensued between the athletes and two armed gas station security staff, who displayed their weapons, ordered the athletes from their vehicle and demanded the athletes provide a monetary payment. Once the security officials received money from the athletes, the athletes were allowed to leave.”

Police and the station’s owner said the Americans damaged an advertising sign, and that two women were with the men but stayed in a taxi that was parked behind their cab.

The USOC statement went on to apologise for the events: “The behaviour of these athletes is not acceptable, nor does it represent the values of Team USA or the conduct of the vast majority of its members. We will further review the matter, and any potential consequences for the athletes, when we return to the United States.

“On behalf of the United States Olympic Committee, we apologise to our hosts in Rio and the people of Brazil for this distracting ordeal in the midst of what should rightly be a celebration of excellence,” the statement concluded.

Police said earlier on Thursday that Bentz and Conger blamed Lochte for the original story, saying he was drunk and agitated. Police added that neither Bentz nor Conger had given a misleading statement after the Sunday incident, saying only Lochte and Feigen had done so. The USOC said Feigen has spoken to police and provided them with a revised statement.

Meanwhile, Lochte’s attorney, Jeff Ostrow, has insisted the story was not made up and told the New York Times the surveillance video corroborated the “primary elements” of Lochte’s version of events.

“There was a uniformed person with a gun who forced them to hand over their money,” Ostrow told the newspaper.

Bentz and Conger arrived in Miami from Brazil on Friday morning after being moved to business class and covering themselves to avoid media during an overnight flight, according to a Reuters witness.