A quick-thinking train engineer is being credited with saving the life of a 10-month-old poodle-terrier mix who was tied to the tracks by his elderly owner.

The unnamed Union Pacific Railroad engineer reportedly spotted someone walking away from the tracks near Mecca in Riverside County, California, after having left something behind.

He immediately activated the train's emergency braking system, and managed to stop just short of the defenseless puppy.

"It's probably one of the worst things I've seen," said Union Pacific Special Agent Sal Pina, who released the dog from the ties that bound him to the tracks. "I've never seen something like this."

Pina also caught up with the 78-year-old man responsible for the cruel act, and detained him.

Following a brief interview, however, it was quickly determined that the man was suffering from senility, and was unaware of his actions or their consequences.

He was eventually released to relatives without charges.

The dog, meanwhile, was picked up by Riverside County Animal Services and taken to the Coachella Valley Animal Campus for a thorough check-up and bath.

Named "Banjo" by his temporary caregivers, the pup is now up for adoption, and interested rescuers are invited to email Riverside County Animal Services at shelterinfo@rivcocha.org.

[H/T: Geekosystem, photos via Riverside County Animal Services]