Dog lovers in Memphis, Tennessee, came to the rescue after a picture posted to Facebook showed a helpless pup with its head stuck inside a plastic container.

"If someone tied you up and went to go beating you or attacking you, there is nothing you can do. Same thing with that dog," rescuer Jess McClain told local CBS affiliate WREG. "If another dog came up and attacked him he can't do a thing, or eat or drink."

McClain and about a dozen other local residents helped in the search for the dog after fellow rescuer Beth Gresham posted a picture of the dog to Facebook last Friday.

"Got within 15-20 feet and it raised its head but went into the woods," Gresham wrote on her Facebook page. "Came back out and was able to get this pic (it has been zoomed in) I am leaving jobsite now and going back by."

Gresham had tried to help the dog, but she says it was frightened and ran into the nearby woods when she attempted to approach it. No one is sure if the container was placed on the dog's head intentionally or if it accidentally became stuck after looking for food.

The small white dog with black spots appeared very thin and was likely one of many dogs abandoned in the nearby woods, according to Gresham.

Thankfully, the story has a happy ending. The Examiner reports that the dog, now named Miracle, was found on Saturday night after rescuers used container cutters to free it. The rescue team also found another stray dog during its search, and it looks as if both will find new homes.

Miracle's rescue was a heartwarming example of social media being used for good. Gresham's photo was shared by hundreds of local Facebook users and eventually picked up by WREG, which ran a story on the search for the dog.

More popular Yahoo! News stories:

• 16-year-old boy takes Justin Bieber cardboard cutout to prom (VIDEO)

• Orvillecopter: Dead cat becomes flying machine

• Missing beagle rescued from Spanish lab sparks public search