The 2021 Kentucky Derby winner, Medina Spirit, failed a drug test after the race, putting a new stain on a sport troubled by doping problems and placing thoroughbred horse racing's most recognizable personality, the Hall of Fame trainer Bob Baffert, under uncomfortable scrutiny.

If he is disqualified, Medina Spirit will be stripped of the Derby title and its winning purse, and become only the third horse in the 147-year history of the race to receive such a penalty after finishing first. The colt cannot be disqualified until a second sample, collected at the same time as the first, confirms the result in a test expected in the coming weeks. Baffert will then have an opportunity to appeal.

The positive test comes as horse racing, acknowledging it has a drug problem, prepares to implement the Horseracing Integrity and Safety Act, which was passed last year in Congress. It will take effect July 1, 2022, and calls for a board overseen by the Federal Trade Commission to write rules and penalties to be enforced by the United States Anti-Doping Agency.

The agency, which regulates Olympic and other elite athletes in the United States, revealed the cyclist Lance Armstrong's cheating and issued him a lifetime suspension in 2012.

In a statement, officials at Churchill Downs, the racetrack in Louisville, Ky., said that if Medina Spirit's positive test was confirmed, the Derby's runner-up, Mandaloun, would be declared the winner.

On Sunday, Churchill Downs officials suspended Baffert from entering other horses there. It's unclear how long the suspension will last or how it will affect his standing in the sport. The officials said they would await the results of the Kentucky Horse Racing Commission's investigation "before taking further steps" regarding Baffert's suspension.

The drug found in Medina Spirit's system was betamethasone, a corticosteroid injected into joints to reduce pain and swelling. In a news conference Sunday morning outside his barn at Churchill Downs, Baffert said neither he nor anyone else on his team had administered the drug to Medina Spirit. He insisted the colt had not been treated with it.

He said he intended to run Medina Spirit in the Preakness Stakes, the second leg of racing's Triple Crown, on Saturday in Baltimore. Preakness officials said they would make a decision about the colt's eligibility after a review of the facts.

"I was totally shocked when I heard this news," he said. "I am the most scrutinized trainer. And I am OK with that. The last thing I want to do is something that would jeopardize the greatest sport. I'm worried about the sport. This is a pretty serious accusation. We're going to get to the bottom of it. We didn't do it.

"There's problems in racing. But it's not Bob Baffert."

Horse racing in the United States has long had a culture of drugs and lax regulation and has a far higher rate of horses breaking down and being euthanized than in most of the world.

Trainers experiment with anything that may give their horses an edge, including chemicals that bulk up pigs and cattle before slaughter, cobra venom, Viagra, blood doping agents, stimulants and cancer drugs. Detection is difficult as laboratories scramble to keep up.

Common drugs such as the anti-inflammatory found in Medina Spirit pose the greatest risk to horse and rider. At higher levels, pain medicine can mask injury, rendering prerace examinations less effective. If a horse cannot feel pain, it may run harder than it otherwise would, putting extra stress on the injury.

The new law was decades in the making. Many in the sport, seeing its profitability decline and concerned about the public's trust in it, urged Congress to create a central agency with uniform rules and meaningful penalties. For now, each of the 38 states that permit horse racing regulate the sport with a hodgepodge of rules.

Harsh punishments are rare. In 2011, another well-known trainer, Rick Dutrow, who won the 2008 Kentucky Derby and Preakness Stakes with Big Brown, was punished for doping violations similar to Baffert's. He was barred from racing in the United States for 10 years.

The Jockey Club, a leading industry organization that helped push the new law, said in a statement that it was "troubled" by the report about Medina Spirit.

"Bettors and fans need to have unshakable confidence in the integrity of the sport," the statement said.

With Medina Spirit's victory on May 1, Baffert won his seventh Kentucky Derby, surpassing a record set by Ben Jones, who collected his blankets of roses in 1938, 1941, 1944, 1948, 1949 and 1952.

At 12-to-1 odds, Medina Spirit was a surprising winner of America's most famous race. The colt was sold as a yearling for only $1,000 and was a bargain for his current owner, Amr Zedan of Saudi Arabia, at $35,000.

The colt's positive test adds to the questions surrounding Baffert. Regulators in Arkansas last month upheld a ruling that a banned substance had been found in two of his horses, but they decided to reduce his penalty from a suspension to a fine.

Medina Spirit tested positive for the same substance found last year in Baffert's Gamine after the horse finished third in the Kentucky Oaks, a showcase for 3-year-old fillies held at Churchill Downs the day before the Derby. Gamine was disqualified, and her owners were denied the $120,000 purse for her third-place finish. Baffert was fined $1,500.

At stake for Zedan is the Derby's $1.8 million first-place check, which would be awarded to the owners of Mandaloun. Bettors who backed Medina Spirit, however, would keep their winnings, while supporters of Mandaloun would be left with losing tickets.

Officials from the Kentucky Horse Racing Commission did not respond to calls and emails for comment.

Baffert has gained the enmity of rivals who believe he has persistently cheated, suspicions fueled by 30 drug tests his horses have failed over four decades, including five in the last year or so.

The cases took months, if not years, to adjudicate and were met mostly with modest fines or brief suspensions as Baffert asserted he did nothing wrong and blamed environmental contamination or human error for the results. Still, deep-pocketed owners flock to Baffert's stable.

In 2019, The New York Times reported that Justify, also trained by Baffert, had failed a drug test after winning the 2018 Santa Anita Derby in Southern California. The rule at the time required that Justify be disqualified, forfeiting his prize money and preventing his entry into the Kentucky Derby a month later.

The California Horse Racing Board's chairman at the time, Chuck Winner, had employed Baffert to train his horses. Justify's failed test was investigated for four months, allowing the horse to keep competing long enough to win not only the Derby, but also the Preakness and the Belmont Stakes to become the 13th Triple Crown winner. His postrace tests were clean in all three.

In August 2018, after Justify's breeding rights had been sold for $60 million, the racing board's medical director suggested the illegal substance might have been present in some jimsonweed the horse ate. The board disposed of the inquiry altogether during a rare closed-door session.

If Medina Spirit is disqualified, Baffert and the colt will join Maximum Security and Dancer's Image as the only horses to have their Derby victories overturned.

In 2019, Maximum Security was first across the finish line, only to be disqualified for almost knocking over a rival horse in the far turn and slowing the momentum of others. The next year, Maximum Security's trainer, Jason Servis, was among the 27 people charged by federal prosecutors in a wide-ranging scheme to secretly dope horses and cheat the betting public.

In 1968, Dancer's Image's victory was taken away after a drug test showed the presence of a banned anti-inflammatory.

Last year, facing criticism, Baffert apologized for his horses' violations and promised to be more vigilant in the future.

"I am very aware of the several incidents this year concerning my horses and the impact it has had on my family, horse racing and me," Baffert said in a statement. "I want to have a positive influence on the sport of horse racing. Horses have been my life, and I owe everything to them and the tremendous sport in which I have been so fortunate to be involved."