Updated

A shelter dog is being hailed a hero for saving a Florida girl from an alleged attack by a sex offender.

The 17-year-old girl was volunteering for the Friends of Strays animal shelter in St. Petersburg a few weeks ago when she was assaulted, WTSP-TV reported.

The girl was walking with Mabeline, a Rhodesian Ridgeback mix, down a path behind the building when the attacker allegedly grabbed her by her hair and pinned her to the ground, according to the station.

The teen was able to break loose from her assailant when the 38-pound dog reportedly scared him away. The South Florida Sun Sentinel identified the suspect as Michael Paul Bacon of St. Petersburg, Fla.

Mabeline, described by shelter workers as an "absolute sweetheart," has since been adopted.

"She was a wonderful stray dog who came to us and we were able to place her in a forever home," the shelter's executive director, Beverly Passe, told FoxNews.com. "We have plenty more like her who need homes, too."

Mabeline's new owner, Mary Callahan, told the station that she was unaware of the dog's heroic act when she adopted her. When she learned the back story, she saw Mabeline in a new light.

"I looked at my dog and I thought, 'You are a hero,'" she said.