A pit bull named Lilly risked her life to pull her unconscious owner from the path of an oncoming freight train last week. The loyal dog suffered serious injuries but saved her owner, Fox News reports.

Christine Spain was walking home with Lilly when she fell unconscious onto the railroad tracks in Shirley, Mass., the Sentinel and Enterprise reports.

Before long, a freight train was barreling towards them.

"I don't know if she collapsed or what happened, but she passed out," Rob Halpin, spokesman for the Massachusetts Society for the Prevention of Cruelty to Animals told the Sentinel and Enterprise. "The engineer, the only witness, told police he saw a dog frantically pulling at a woman as he drew closer. He did everything he could. He heard a thump and thought he hit both."

The engineer hit the brakes and got off the train to find Spain unharmed.

The 8-year-old pit bull suffered severe injury to her right foot. She also fractured her pelvis in multiple locations and sustained other internal injuries.

According to Fox News, David Lanteigne -- a Boston police officer and Spain's son -- had rescued Lilly a few years ago as a therapy dog for his mother who suffers from alcoholism.

"I truly believe things happen for a reason," Lanteigne told the Sentinel and Enterprise. "We found Lilly to save her life, and she returned the favor. She almost died here."

Lilly's foot could not be saved and her right front leg had to be amputated, but her veterinarian told WCVB-TV that she should be able to walk once she has recovered. Due to her age, Lilly must recover from the amputation before she can undergo surgery for her other injuries.

Despite the trauma she has endured, Fox News reports that the canine hero is on the road to recovery.

"I'm supposed to be the strong one. I'm supposed to be here for her, but she's been so great, so tough through all this that it almost feels like she's the one comforting me, being there for me and making me feel better," Lanteigne said

A fund has been set up to help offset Lilly's medical care, which will likely run into the thousands of dollars. For more information, visit www.mspca.org/helplilly.