Two elite Chinese swimmers, including one named to her country’s team in the Paris Olympics, tested positive in 2022 for a banned drug but were secretly cleared of doping late last year by Chinese authorities, according to two people with direct knowledge of the matter.

After a lengthy investigation into the previously undisclosed incident, the Chinese authorities were unable to determine exactly how the swimmers ingested the drug, a powerful anabolic steroid, but concluded that they had most likely done so unwittingly when they ate hamburgers at a restaurant in Beijing.

The Chinese emphasized in their explanation to global antidoping regulators that only trace amounts of the steroid had been detected and said that those levels were consistent with contamination, not doping.

The decision to clear the swimmers was at least the third time in recent years that China has blamed contaminated food for positive tests by top swimmers, an explanation that has drawn skepticism from many antidoping experts. Critics see the incident as the latest in a pattern of China’s looking the other way when confronted with positive tests in its swimming program, and as a failure by global antidoping agencies to ensure a level playing field for elite athletes.

Investigators and at least one expert for the World Anti-Doping Agency, known as WADA, were not convinced of the contamination explanation in the most recent case, one of the people with knowledge of the matter said. But the agency — which is supposed to serve as a backstop when a country’s own antidoping authorities fail to properly police its athletes — chose not to appeal China’s decision not to impose bans on the swimmers.

Another antidoping agency, the International Testing Agency, which was created in the wake of the Russian doping scandal that rocked Olympic sports nearly a decade ago, also reviewed the case. At least one I.T.A. official believed that swimming’s global governing body should appeal the Chinese decision to clear the athletes, the people with knowledge of the case said. But the swimming organization, known as World Aquatics, did not do so.