DETROIT – A video captured a dog attacking a mail carrier Friday in Detroit as neighbors tried to stop the attack.

A man driving on Ardmore Street near Eight Mile Road on the city's west side saw the vicious attack and people trying to stop the animal.

One person tried to intervene with a broom, while the man in the vehicle got out and used a trash can, but the attack continued. Eventually, a neighbor was able to get hold of the dog's leash and get it off the mail carrier, and the man who was in the vehicle got the victim in his car for protection.

The dog managed to bite through the mail carrier's shoes. EMS transported the victim to a hospital.

Watch the video here. WARNING: The footage is graphic.

The U.S. Postal Service released a statement after the attack:

"The Postal Service is investigating this tragic incident and working with local authorities. We are deeply grateful to the concerned citizens who came the aid of our letter carrier. Unfortunately attacks such as this provide the postal service an opportunity to remind dog owners that it is their responsibility to restrain their pet in order to avoid attacks against our employees while they are in performance of their duties.

"The Postal Service offers these tips for homeowners to prevent dog attacks:

When a mail carrier delivers mail or packages to your door, put your dog in a separate room and close that door.

Teach your children and family members to not take mail directly while the family pet is nearby. The animal may see that as a threatening gesture.

Obedience training can teach dogs proper behavior and help owners control their dog in any situation.

The USPS is using technology to help keep mail carriers safe. When a customer uses the Package Pickup application on usps.com, customers are asked to indicate whether there is a dog at the address. That information is relayed through the delivery scanners.

If a mail carrier feels threatened, the owner may be asked to pick up mail at a nearby post office. And if a dog is roaming the neighborhood, the neighbors may also be asked to pick up mail at the Post Office.

"Thank you for respecting the privacy of this employee as he recovers from injuries suffered in this attack."