Ryan Lochte’s future as a competitive swimmer was called into question Thursday, when the U.S. Olympic Committee and USA Swimming jointly announced that the 12-time Olympic medalist has been suspended for 10 months and barred from the 2017 world championships for his role in a gas station confrontation with armed security guards during the Rio de Janeiro Olympics, nearly overshadowing the Games’ second week.

The three other swimmers with Lochte on the morning of Aug. 14 — Gunnar Bentz, Jack Conger and James Feigen — were suspended for four months each but remain eligible for the world championships. All four will lose their stipends and other bonuses during the suspensions — which, in Lochte’s case, could cost him as much as $100,000 — and won’t be permitted to join Team USA during a scheduled visit to the White House later this month.

“Unfortunately, this story line took attention away from the athletes who deserved it the most,” USA Swimming Executive Director Chuck Wielgus said in a statement. “These athletes took accountability for their mistakes and are committed to represent themselves and our country with the great character and distinction we expect.”

The suspension of Lochte, 32, is four months longer than the one given to longtime U.S. teammate and rival Michael Phelps in 2014 when the latter was arrested for a second time for driving under the influence and undoubtedly reflects the degree of embarrassment Lochte caused for the American delegation in Brazil, as well as for the host country.

“The behavior of these athletes was not acceptable,” USOC CEO Scott Blackmun said in a statement. “It unfairly maligned our hosts and diverted attention away from the historic achievements of Team USA.”

All four of the swimmers signed statements accepting the sanctions. Lochte’s includes 20 hours of community service, while Bentz, 20, must perform 10 hours of community service for violating the USOC’s curfew rules for athletes under 21. The suspensions will not affect the NCAA eligibility of Bentz (Georgia) or Conger (Texas).

Conger, a Rockville native and former All-Met swimmer from Good Counsel, could not be reached for comment, but he told the Austin American-Statesman this week, “I do not in any way agree with those sanctions, [but] I thought it was best . . . just to put an end to this, regardless whether I thought the consequences were fair or not.”

In his original telling of the story of what happened that morning, Lochte said his group was pulled over in their taxi and robbed by armed assailants impersonating police, one of whom pointed a gun to his forehead. That story caused a media outcry in a city where street violence is a constant danger, but after Brazilian officials cast doubt on the story, Lochte later admitted embellishing elements of it.

In fact, the confrontation occurred at a gas station, where the swimmers acknowledged they urinated on a wall and where Lochte tore down an advertising sign. When Lochte’s group attempted to leave without paying for the damage, at least one security guard pulled out a weapon and demanded money before they could leave.

Lochte left Brazil soon after the incident, but the others had their passports confiscated and were questioned by authorities — with Feigen paying a fine of about $11,000 — before being permitted to leave the country. Brazilian authorities filed charges against Lochte for falsely reporting a robbery, but it is unlikely he would return there to face those charges. In his last interview with NBC, he acknowledged he “over-exaggerated” the story and apologized for his “immature” behavior.

In the wake of the incident, Lochte lost all of his major sponsorship deals, which were estimated to be worth at least $1 million annually. He has said he plans to continue his swimming career, but in the short term he has signed on to participate in ABC’s “Dancing With the Stars,” which premieres next week.

Ryan Lochte’s suspension puts an end to any hope he had of making the U.S. team for the 2017 World Championships. (Jonathan Newton/The Washington Post)

Even without the suspension, Lochte’s future in the sport was murky at best. He showed signs of decline this year, suffering a groin injury at the Olympic trials and qualifying for the Olympics in only one individual event — the 200-meter individual medley, in which he finished fifth. His lone medal in Brazil was a gold as part of the 4x200 freestyle relay.

The suspension’s length means Lochte would next be eligible for a major international meet at the 2018 Pan-Pacific Championships, when he would be 34. He will turn 36 the same summer as the 2020 Tokyo Olympics.