May 9, 2012 -- Move over, Lassie. A Massachusetts pit bull named Lilly took on a freight train last week to save her owner, who collapsed unconscious onto the tracks during a late-night walk in Shirley.

The 8-year-old dog used her teeth to pull Christine Spain, 54, off the tracks as the train approached. While Spain emerged unscathed, Lilly lost a leg.

The train's engineer, who didn't want to give his name, said he spotted the woman and her dog on the tracks just after midnight on May 3, according to the Angell Animal Medical Center in Boston. He said he tried to stop the train in time but feared he'd hit them both. When he got out, he found that Spain was unharmed, but the train's wheels had sliced through Lilly's front right leg, which was bleeding heavily.

An animal control officer rushed Lilly to an emergency animal hospital in nearby Acton, where Spain's son, Boston Police Officer David Lanteigne, met them in the parking lot. Lanteigne said he had a feeling of dread as he got out of his car, but Lilly let him know she was OK.

"The first thing I see is just those big, beautiful eyes just looking at me, and next to her, I saw her right front paw was severely damaged," he told ABC News. "I saw her tail wagging the first time right there."

Lanteigne said he rescued Lilly three years ago, thinking she'd make a good therapy dog for Spain, who had battled alcoholism, depression and anxiety for many years. He said Spain doted on the dog, and often defrosted packets of green beans to cut them up and put them in Lilly's food. Eventually, he said, Spain's drinking decreased.

"We saved Lilly, and Lilly saved my mom's life," he said. "My hope is that this story is going to get out and show what pit bulls are truly about. I hope by Lilly going through this, it's going to get other dogs homes."

Lilly underwent two surgeries last weekend at the Angell Animal Medical Center. Steel plates were implanted to repair her fractured pelvis and support her left leg. She now has a long scar where her right front leg was amputated.

Angell spokesman Rob Halpin said Lilly's doctors expect she'll be able to walk again, but adjusting to three legs will be hard for the senior dog.

Meg Whalen, one of Lilly's doctors, said the pit bull's rescue "captured the hearts" of the staff.

"She's got the character and spirit that sometimes trumps all our medical advances when it comes to recovery," Whalen said. "I think she's got what it takes to get back to her former self."

On Wednesday, Lilly tried to stand up when Lanteigne came by to visit, but her hind legs won't be able to bear weight for the next few weeks.

Spain, who Lanteigne said relapsed before her collapse last week upon hearing some bad news, was arrested on the scene and arraigned the following day in Ayer District Court on charges of obstruction and danger on a railroad track, walking on a railroad track and animal cruelty, Shirely Police Executive Secretary Ann Whiting told ABC News. Spain was not arrested on any alcohol-related charges, but she was placed in protective custody because of intoxication, said Whiting.

Lanteigne said the accident had been hard on his mother, but she has been helping him get ready for Lilly's homecoming by sterilizing the apartment and bringing over all of Lilly's favorite toys.

"Lilly's been her heart and soul," Lanteigne said of his mother's relationship with the dog. "Thank God Lilly was there."