When retired racehorses first arrived at the USA's Wallkill Correctional Facility, Jim Tremper expected to teach horsemanship skills to inmates who would be looking for jobs when they were freed.
Three decades later, the horse program hasn't worked out as intended, and Tremper, the farm manager, as well as prison authorities and inmates are pleased with the results.
The programme called Second Chances ostensibly teaches horse grooming and feeding, and while few released inmates have taken jobs with horses, its lessons in patience, empathy, overcoming anger and impulsiveness have proven far more valuable, they say.
A project of the Thoroughbred Retirement Foundation, Second Chances marks its 30th anniversary this week at Wallkill, where it began in 1984. It has since expanded to prisons in California, Florida, Illinois, Indiana, Kentucky, Maryland, Massachusetts, South Carolina and Virginia.
Noel Jiminez, 34, serving time at Wallkill for assault, said working with the horses is therapeutic.
"It helped me control myself to not be angry with them not understanding me. I knew I had to be patient to have them get along with me," Jiminez said.
Some 400 horses and 400 inmates have gone through the programme, which relies on donations, at the medium-security prison about 130 km north of New York City.
Some horses are trained to be gentle enough to be adopted out, while others spend their lives at the prison farm.
Two dozen inmates care for them within sight of a guard tower that marks a sharp contrast with the rustic stables, gentle neighing and barn cats sleeping in the sun.
"We keep rescuing horses, and the horses teach the guys how to be people again. It's an awesome thing to watch," Tremper said.
The thoroughbreds, retired from racing, were sent by their owners, rescued from abuse or neglect or purchased at feed lots before they were shipped to slaughter, Tremper said.
More than 10,000 US racehorses are shipped to slaughter each year in Canada and Mexico, according to the Thoroughbred Retirement Foundation. Overall, US horses exported for slaughter in 2013 numbered more than 144,000, according to the American Society for the Prevention of Cruelty to Animals (ASPCA).
Many of the 45 horses now at Wallkill arrived malnourished or badly injured, like 31-year-old Lunar, easy to spot with his hooves splayed from breaking both front ankles when he raced.
"They're in the same situation we are, in a sense," said Scott Coyle, 47, serving time for heroin possession. "If they weren't here, they'd be dead. If I wasn't here, I'd be dead, with my drug use."
Tremper said he knows of just two former inmates working in the horse industry. Most inmates don't stay in touch, he said, while others aren't interested in low-paying stable work.
Second Chances alumnus Dax Rodriguez, 43, works at a breeding farm in Gansevoort, New York after serving nearly 20 years for attempted murder. He said horses taught him compassion.
"It made me see that life is really not supposed to be that cold or that mean, and there's a different way," he said.
Studies show educational programmes in prison reduce recidivism rates, but specific figures on the success of horse programmes or other animal programmes are hard to come by.
The state Department of Corrections and Community Supervision did not have any figures immediately available, and the Pew Charitable Trusts' project that studies prison systems does not track animal programmes in particular.
Timothy Laffin, Wallkill's superintendent, has high praise for the influence on inmates.
"It gives them a work ethic, and it's something that I think they take back to society with them," he said.
Tremper said he rarely sees Second Chance inmates return but that the programme is not permitted to calculate recidivism.
"The biggest thing is the change that it makes in these guys, how they carry themselves, how they run their lives after they're done here," Tremper said.