The Kentucky Derby has been run through two World Wars, the Great Depression, civil rights unrest and, most recently, a life-paralyzing pandemic. Now, on the 150th anniversary of America’s most famous race, the Sport of Kings faces another formidable foe: itself.

Last year, beneath Churchill Downs’s iconic twin spires, seven horses died during the week of the showpiece event — two of them in races in the hours leading up to the Derby. In the days after, five more sustained fatal injuries, prompting Churchill officials to move their races to another Kentucky racetrack.

It got worse. A colt trained by the sport’s most recognized and controversial trainer, Bob Baffert, died at Pimlico Race Course hours before Mr. Baffert saddled the winner of the Preakness Stakes, the second leg of the Triple Crown. Two more horses not trained by Mr. Baffert died in races surrounding the Belmont Stakes, the third leg, in June.

At the historic Saratoga Race Course in New York, 13 horses died while racing and training at the sport’s signature summer meet, including two who seemed poised to win their races before breaking down near the finish line on nationally televised broadcasts.

Over the past 12 months, The New York Times analyzed confidential documents and covert recordings made by law enforcement, and obtained exclusive interviews as part of an investigation into why so many horses, supposedly in peak physical condition, were breaking down so frequently. In the documentary “The New York Times Presents: Broken Horses,” now streaming on Hulu, The Times found that reckless breeding and doping practices, compromised veterinarians and trainers, and decades-long resistance to changes that could save horses lives have placed a multibillion-dollar ecosystem in peril and put the social acceptability of one of America’s oldest sports at risk.

“There’s a genuine feeling that this is the inflection point, and if we don’t act, it may be too late,” said Lisa Lazarus, the chief executive of the Horseracing Integrity and Safety Authority, or HISA, the federal agency that now regulates the sport.

In Louisville, Ky., on Saturday, racing officials and horse lovers will hold their collective breath and hope that every horse competing gets around the track safely. To avoid last year’s calamity, an army of veterinarians will pore over months of medical records with an assist from artificial intelligence and scrutinize horses each morning with the critical eye of a diamond jeweler. Data from high-tech motion sensors will monitor horses, and an old-fashioned “bucket brigade” as well as state-of-the-art equipment will be dispatched frequently to pick rocks from the racetrack that authorities determined could have played a part in last year’s cluster of deaths.

Saffie Joseph Jr., who was suspended by Churchill last year after two horses he trained collapsed and died ahead of the Derby, will have a horse in the race. He was reinstated when the necropsies of those horses were inconclusive.

“They were trying times,” Mr. Joseph said. “We let the process play out. We were cleared as we knew we would be.”

HISA investigated the deaths at Churchill and Saratoga and concluded that several factors, including frequency of high-intensity exercise, likely contributed. No illegal drugs were detected in the horses who died. The majority of the injuries involved a fetlock joint. Some of the horses who died received corticosteroid injections in their joints within 30 days of racing. That is currently allowed, although HISA has proposed prohibiting those injections within 30 days.

But racing’s problems go far beyond what happened last year. An F.B.I. investigation that began in 2015 produced nearly three years of wiretaps that provided a soundtrack for a deadly doping ring that stretched from Florida to New Jersey. At its center was a veterinarian and drug compounder named Dr. Seth Fishman, who bragged on wiretaps about “having a relationship with top trainers and top owners” in the horse racing world. He knew what he was doing and, in at least one case, wanted to make sure his clients understood that they were breaking the rules.

“What I’m trying to say is anytime you give something to a horse, that’s doping. So don’t kid yourself,” Dr. Fishman said to one, as heard in a wiretap.

The investigation exposed the weaknesses in American testing labs. After being tipped by an informant that some horses had recently been doped, an F.B.I. agent posing as a New Jersey racing official pulled samples from a group of horses and sent them to a Hong Kong laboratory considered one of the finest in the world. Evidence of illegal blood doping was detected.

The doping was often deadly. U.S. attorneys in the Southern District of New York said their three-year investigation had produced evidence that at least 20 horses perished because they were given illegal drugs by those involved in the ring.

“Nobody believed that anybody was going to jail for this behavior,” said Shaun Richards, the F.B.I. agent in charge of the investigation. But more than 30 trainers, veterinarians and drug salespeople either pleaded or were found guilty and went to jail.

For the third straight year, the Derby will be run without a horse trained by Mr. Baffert. In 2021, his colt Medina Spirit won the Derby but subsequently was disqualified after testing positive for betamethasone, a potent corticosteroid used to reduce pain and inflammation. Churchill Downs barred him from its racetracks for two years and, over the summer, extended the suspension through 2024.

Mr. Baffert’s horses have won the Derby six times, and he has been named champion trainer four times. He is third on the career earnings list with more than $355 million in purses. Mr. Baffert also has a lengthy record of rule violations. According to regulators’ records, horses trained by him have failed 30 drug tests over four decades — most notably Medina Spirit, who died after a workout at a California racetrack five months after running the Derby. Since 2000, at least 77 horses have died under his care, according to data from the California Horse Racing Board.

“We decided to continue Bob Baffert’s suspension for another year because he hasn’t accepted responsibility for what happened,” Bill Carstanjen, chief executive of Churchill Downs Inc., said of the positive test in the Derby. “It’s about the game and the product as a whole, and it’s about ensuring to the public that they can rely on what they see being fair and safe. The rules have to apply to everybody.”

Mr. Baffert returned to the Triple Crown trail last year to win the Preakness Stakes with National Treasure in Baltimore. Hours before, however, another one of his colts, Havnameltdown, sustained a fatal injury during a race and was euthanized on the track.

The Times had two veterinarians, Dr. Sheila Lyons and Dr. Kate Papp, independently review the records related to the 2023 deaths at Churchill Downs and Pimlico. Dr. Lyons said the necropsies from Churchill were illuminating but incomplete because they lacked medication and treatment histories of each horse.

“What I found was that these horses had significant pre-existing injury, not only on the limb that broke down, but in other limbs as well,” Dr. Lyons said. “We don’t even know whether these horses were running with legal therapeutic medications.”

In the case of Havnameltdown, Dr. Lyons and Dr. Papp agreed that his death could have been prevented with vigilant veterinarian care by both his private veterinarian as well as regulatory ones in charge of ensuring a horse is sound before being allowed to race. Havnameltdown had lesions in each fetlock, which occur when the cartilage has worn away from repetitive injury.

“He didn’t only have it in the leg where this fracture occurred, this horse had it in all four limbs,” Dr. Lyons said. “This is easily diagnosed, X-ray equipment in every track practicing vet’s vehicle, it would take 10 minutes.”

Dr. Lyons said regulatory veterinarians noted abnormal findings in the colt’s range of motion and gait but ultimately concluded the horse was healthy enough to race. In addition, Havnameltdown had corticosteroids and hyaluronic acid — a pain reliever and an anti-inflammatory — injected in both hocks and both stifles a month before his last race. Joint injections are permitted by HISA up to 14 days before a race.

“Havnameltdown should not have been racing that day. Absolutely not, under any circumstances,” Dr. Papp said, based on her review of the necropsy results. “Baffert is the main caretaker for this horse. In my opinion, he is the responsible party for what happened.”

In an emailed statement, Mr. Baffert’s lawyer, Clark Brewster, said: “He entrusts the medical evaluation, diagnosis and treatment of the horses to his veterinarians and relies on their expertise. Baffert cares deeply for the horses under his care and is fully committed to their health, safety and general welfare.”

In August 2023, Mr. Baffert’s longtime veterinarian, Dr. Vince Baker, was placed on four years’ probation by the California Veterinary Medical Board for administering “dangerous drugs” to racehorses — including Medina Spirit — “at the request of their trainers without medical examinations or necessity.”

This will be the first Derby to fall under HISA’s antidoping and medication control program, which went into effect on May 22 — two days after Havnameltdown died. HISA has been tasked with enforcing uniform safety and medication rules in thoroughbred racing in the United States but has faced an uphill battle since it was established by Congress in 2020, taking over from state regulators.

Yet more than 50,000 samples were collected from 21,750 horses in 2023, resulting in 246 positive tests and the identification of 58 banned substances. The authority searched 141 barns across 38 tracks and recovered five different banned substances, resulting in 11 possession cases. An anonymous tip line received 122 calls, with more than 40 leading to an investigation.

“Are we ahead of the curve now? Probably not,” Ms. Lazarus said of being able to detect performance-enhancing drugs. “But we have a good chance at getting there.”

The National Thoroughbred Racing Association has acknowledged that horse racing has an image problem and recently started a multimillion-dollar advertising campaign called Safety Runs First that will be shown throughout the Triple Crown.

One change that HISA celebrated was its use of six drug-testing laboratories to deliver uniformity and faster turnaround times. The University of Kentucky’s Equine Analytical Chemistry Laboratory, however, was recently removed because of alleged personnel and quality issues. The university and HISA would not comment while investigations are underway.

The rate of fatal injury increased slightly in 2023, to 1.32 per 1,000 starts, from 1.25 in 2022, which was the lowest rate since 2009, when the Jockey Club started the database. HISA said that racetracks under its jurisdiction had 1.23 fatalities per 1,000 starts. (Texas, Louisiana, West Virginia and Nebraska have pushed back against HISA regulation and are not covered.) Neither data set includes training fatalities.

Ms. Lazarus said that by 2025, the authority hoped to have a public database that logged racing and training fatalities as they happened, like the ones kept by California and New York. She also said HISA was working to standardize necropsy procedures.

She acknowledges there are limits to HISA’s authority, which covers horses that have recorded a timed workout at the racetrack. Breeding and sales remain largely unregulated, and practices like repeated breeding of unsound horses, corrective surgeries and drug use are believed to be widespread. The three major thoroughbred sales companies recently announced that starting July 1 they will strengthen their drug policy to more closely align with HISA’s. Yet the enforcement of such a policy would be up to the companies, and no details have been provided.

Arthur Hancock III, who along with his wife, Staci, has campaigned for reform since the 1990s, says the authority must succeed. In 2013, the couple formed the Water Hay Oats Alliance to get drugs out of racing, growing it to more than 1,800 industry members who shamed horsemen, veterinarians, politicians and regulators into treating thoroughbreds as athletes rather than commodities.

“There is a new sheriff in town, and he means business,” Mr. Hancock, a fourth-generation breeder, said of HISA. “If we don’t get rid of the drugs and thugs, they’re going to get rid of us.”