It was a saga that captured the hearts and imagination of millions–how a sweet colt made an instant connection with a teen who battled a cruelly debilitating syndrome and forged a link that carried them both to world-wide fame.

Cody Dorman, who suffered from Wolf-Hirschhorn syndrome, found joy in the fabulous career of Cody’s Wish, the colt named after him. Cody met the son of Curlin at Godolphin’s Gainsboroough Farm on a visit sponsored by the Make-A-Wish Foundation, and it was love at first sight.

Due to his condition, Cody could only communicate directly using eye-tracking to operate a tablet, but he still made himself understood to all of those around the world who followed his story.

Whenever his family could get him to the track, Cody was there, and the horse named after him was winning. Cody was his good luck charm.

That was never more evident than on Saturday in the Breeders’ Cup Dirt Mile at Santa Anita. There, the four-year-old colt battled for the win by a nose, and then withstood an objection to collect the trophy as Cody watched. It marked the end of the horse’s racing career, as he moves on to stud duty.

And with unbelievable timing, it was also the end of a heartwarming story. It somehow appears to be more than a sad coincidence that Cody himself departed a day later. He died on the way home from California to Kentucky. Cody’s Wish had been his work, and his work was done.

Michael Banahan, director of bloodstock for Godolphin USA, said the loss of the teen is especially difficult after the excitement of Breeders’ Cup weekend.

“It really does seem like divine intervention from the day Cody and Cody’s Wish first met,” he said.

“The highs and now the lows—it’s hard to comprehend. It has hit us all like a wall.”

He added about Cody’s famiIy, “I do hope they find comfort from the journey they’ve been on.”

In a statement, the family said, “We are heartbroken to share the news that our beloved Cody suffered a medical event on our trip home to Kentucky yesterday and he has passed away.

“On Saturday, Cody watched his best friend, Cody’s Wish, display his usual perseverance and toughness in winning a second Breeders’ Cup. Those are the same characteristics Cody has showed time and again for the 18 years we were blessed to have him. We have been completely amazed to experience the impact Cody has had on so many people, through the journey that this wondrous racehorse has taken us all on. From Churchill Downs, to Keeneland, to Saratoga, to Santa Anita this weekend, we could not move 20 feet without someone stopping to tell us just that.”

The statement concluded, “With Cody’s diagnosis at birth, we always knew this day would come, but we were determined to help Cody live his best life for however long we had him. Anyone who has seen him at the racetrack, especially around Cody’s Wish, understands that in many ways he taught us all how to live, always keeping a positive attitude and being more concerned about those around him than himself.”

Following the news of the teenager’s death, the Breeders’ Cup issued this statement:

“The entire Breeders’ Cup team is devastated by the news of Cody Dorman’s passing yesterday. His story captured our hearts and minds, and his strength, spirit, and determination were fittingly embodied by his namesake’s commanding performances in his honor. We send our sincere condolences to the Dormans, who gave our sport so much by welcoming us into their family.”

In lieu of flowers, the family asks for donations be made to Make-A-Wish Ohio, Kentucky & Indiana.