RIO DE JANEIRO — Brazilian authorities allowed two U.S. Olympic swimmers to board a U.S.-bound flight on Thursday after police accused them and two of their teammates of lying about being robbed at gunpoint at a Rio gas station.

The swimmers’ account, which had embarrassed the games host city, prompted a police probe which concluded on Thursday with Rio’s police chief accusing them of fabricating the robbery and of behaving badly at the station and damaging a bathroom there.

Gold medalist Ryan Lochte, one of America’s most decorated swimmers, returned to the United States on Monday. With teammates Gunnar Bentz and Jack Conger also heading out of the country, only one remains: Jimmy Feigen, also a gold medalist.

It was unclear if or when Feigen would also be allowed to leave. Police have suggested the swimmers apologize and said they are considering whether to recommend charges of giving false testimony and vandalism.

During the two weeks of the Rio Games, the sporting action has been competing for headlines against a series of muggings and armed robberies of high-profile athletes and visitors in Rio de Janeiro, including two government ministers.

None created more embarrassment for Rio than Lochte’s statement that gunmen posing as police had taken the swimmers’ wallets, and that at one point a gun was put to Lochte’s forehead. But his story appeared to wilt under scrutiny.

“There was no robbery as the swimmers described it,” Rio’s civil police chief, Fernando Veloso, told a news conference on Thursday, adding that it would be noble and dignified if the swimmers were to apologize to the people of Rio.

Brazil’s presidential chief of staff, Eliseu Padilha, chimed in, saying the swimmers should be held accountable.

GloboNews reported that police were recommending prosecutors charge Lochte and Feigen with falsely reporting a crime. But a police source later told Reuters that this had not yet happened.

Neither Lochte nor Feigen could be contacted for comment.

Before leaving for the airport on Thursday night, Bentz and Conger were interviewed at a Rio police station. They later walked from the building to the jeers of a waiting crowd who shouted, “Liars” and “Fakes.” The pair had tried to leave Brazil on Wednesday but were pulled off their flight.

Feigen also spoke to police in Rio on Thursday, a police source said.

After checking in for the flight to Miami, Conger and Bentz were escorted by security to the airport lounge. Their attorney, Sergio Riera, hugged them before they walked through Customs.

Lochte had told U.S. television that he and his teammates were robbed when their taxi was pulled over in the early hours of Sunday as they returned to the Athletes’ Village from a party. Their swimming competition had finished.

Veloso, Rio’s police chief, said there was no robbery as described by the swimmers and that investigations instead revealed that their taxi had pulled into the station where they behaved in a hot-tempered way and damaged a bathroom.

They broke a mirror and a soap holder, he said, adding that they then handed over a total of 100 reais ($31) and $20 in U.S. currency as compensation.

According to Lochte’s account, $400 was stolen from them.

At one point, a security guard pulled a firearm after one swimmer behaved erratically, Veloso said, adding that the guard had not overreacted. “From the moment the gun was pulled out, they calmed down. Once they were calm, the gun was lowered.”

Brazilian TV aired security-camera videos appearing to show the swimmers in a dispute with staff at the gas station, a fact police say they did not mention in their accounts.

The video does not show them causing any damage, but only being hustled out of the bathroom by uniformed employees. Security guards then prevent the swimmers from leaving in a taxi and the Americans appear to offer them money from their wallets.

Three of the swimmers are made to sit on the ground with their hands in the air. At one point, Lochte stands and appears to argue with the guards but is made to sit down again.

Staff at the gas station said on Thursday that the U.S. swimmers ripped an advertising plaque off a wall while they urinated on a wall. Security was called and an argument ensued, said one employee who declined to give his name.

A sign on one of the bathrooms read “Please Do Not Enter.”

A spokesperson for the U.S. Olympic Committee declined to comment on the security-camera footage.

Rio Games organizers on Thursday defended the four swimmers, saying they were just kids who made a mistake.

“They competed under gigantic pressure. Let’s give these kids a break. Sometime you take actions that you later regret. They had fun, they made a mistake, life goes on,” Rio 2016 spokesman Mario Andrada told reporters.