John Veitch, who trained Alydar to narrow losses in all three Triple Crown races against rival Affirmed in 1978 during a Hall of Fame career, has died, his family said Thursday. He was 77.

Veitch died Tuesday of natural causes at home in Lexington, Kentucky, said Michael Veitch, his second cousin who spoke to Veitch’s daughter, Shannon.

During his training career from 1974 to 2003, Veitch had 410 winners from 2,340 starts and earnings of $20,097,980, according to Equibase.

He was born into a family that had been training horses for three generations. His father, Sylvester, is in the Hall of Fame and the younger Veitch started out as his assistant.

In the late 1970s, Veitch became head trainer for famed Calumet Farm, which he helped revitalize before leaving in 1982. He later trained for real estate developer John W. Galbreath and prominent owner Frances A. Genter.

In 1998, Veitch closed his public stable and became racing consultant to a member of Saudi Arabia’s royal family. He returned to the U.S. two years later and again trained for Calumet Farm. Veitch was a memorable figure in the winner’s circle with his bald head and penchant for wearing suits and ties.

Veitch trained four champions: fillies Our Mims, Davona Dale and Before Dawn, as well as Sunshine Forever, the nation’s top male turf horse in 1988.

He trained Proud Truth to victory in the 1985 Breeders’ Cup Classic.

Veitch is best remembered for overseeing Alydar, who with Affirmed formed one of racing’s most storied rivalries. Affirmed beat Alydar by 1½ lengths in the Kentucky Derby, by a neck in the Preakness and by a head in the Belmont Stakes.

In the Belmont, Alydar and jockey Jorge Velásquez battled Affirmed and Steve Cauthen side-by-side from the middle of the far turn all the way to the finish line. Affirmed’s victory gave racing back-to-back Triple Crown winners, with Seattle Slew having swept all three races in 1977.

“What I remember about it most is that he was such a sportsman in the national spotlight,” Michael Veitch said. “Being so respectful and not hesitating to be gracious. John had a very good sense of racing history and he was fully aware of what was going on in that sense of the word.”

Alydar beat Affirmed three times in his career, including the 1977 Champagne Stakes and the 1978 Travers Stakes via disqualification.

Alydar was elected to the Hall of Fame in 1989 and Veitch joined the horse there in 2007.

“I don’t know that there could have been a happier day in his life,” said Michael Veitch, who serves as historian at the National Museum of Racing and Hall of Fame in Saratoga Springs, New York.

“My fondest memory of him is being at Saratoga in the summer and after finishing training hours with Calumet in the morning, he would walk down the lane to his father’s barn and chat about the day’s events and who was going to do what,” Michael Veitch said.

After retiring from training in 2003, Veitch became chief steward for the Kentucky Horseracing Authority. He was fired in 2010 after being accused of mishandling a situation with favorite Life At Ten in the Breeders’ Cup Ladies Classic. She finished last after her jockey, John Velazquez, had raised concerns about how she was warming up beforehand.

Veitch also was suspended for a year. He eventually reached a settlement with the authority. He later worked as a racing official at Keeneland in Lexington.

Besides his daughter, he is survived by son Jason. He was preceded in death by his third wife, Ellen, in 2017. Veitch will be buried in Saratoga Springs.