For all the pageantry associated with horse racing, there is a dark side.

Sometimes it comes when accidents on the track hurt or even kill jockeys and horses. Cruel realities also arrive for horses that aren’t good enough for racing, or whose owners decide the animals are no longer worth the investment.

For 25 thoroughbreds recently sold to a facility in Texas for eventual slaughter, presumably in Mexico, it looked like the finish line. Then, on Tuesday, the farm that bred the horses announced it had bought the animals from the facility and would be sending them to a ranch near Duchesne.

How the horses arrived in Texas is unclear. The horses were bred by Barton Thoroughbreds, based in Santa Ynez, Calif., and with a ranch in Duchesne. In a tweet Tuesday, Barton said it originally had sold the horses to a trainer called Running Horse LLC. Neither representatives there nor at Barton returned messages seeking comment Wednesday.

It’s illegal to slaughter horses in the United States. However, livestock brokers with a permit from the the U.S. Department of Agriculture can ship an allotted amount of horses to slaughter houses in Canada and Mexico.

The 25 Barton-bred horses were at one such farm, Kaufman Kill Pen in Texas. It posts photos of horses on its Facebook page every day, giving people a chance to buy and adopt the horses before they can go to slaughter.

Margaret Ransom, a freelance horse racing writer in Pasadena, Calif., said in a phone interview Wednesday that a friend on Monday night saw the 25 thoroughbreds on the Kaufman Kill Pen page. Registration papers were also posted to demonstrate that the horses were thoroughbreds and showing they had been bred by Barton.

The thoroughbred racing industry finances rescue operations for former race horses and breeding stock. Ransom said Kaufman Kill Pen tends to demonstrate which horses are thoroughbreds because it knows people in the industry or racing fans will pay to prevent slaughtering.

“We won’t put up with it," Ransom said Wednesday. "You cannot dump horses. Period.”

Ransom said she decided to post about the horses on social media. Word apparently spread to Barton. In a series of tweets Monday, it acknowledged becoming aware of its former stock at Kaufman Kill Pen. By late Tuesday morning in California, Barton tweeted that it was repurchasing the horses and sending them to Duchesne.

It’s unclear what will happen to the horses once they reach Duchesne. Barton promotes itself as a breeder, not a trainer, of race horses.

Photos of the Barton-bred horses were not on the Facebook page for Kaufman Kill Pen on Wednesday. A man who answered the phone there said he didn’t know anything about Barton or Running Horse.