A San Francisco Main Library security guard was aggressively attacked by an attendee's dog on Sunday. 

A library spokesperson tells KTVU the incident began when witnesses noticed the barking dog next to its unresponsive owner at a computer kiosk. Two library security guards then approached the owner to administer Narcan, which prevents opioid overdoses, but the owner's dog refused. 

"The dog would not let them near him. The dog lunged at a guard taking hold of his arm and pushing him to the floor," the public library said.

Security guard attacked by dog at San Francisco library

Security guard attacked by dog at San Francisco library

FDA APPROVES FIRST FELINE ARTHRITIS PAIN TREATMENT

The horrific attack, captured on video by a witness, shows the security guard's attempt to fend off the dog with a series of punches while his colleague tried to rescue him by spraying a substance in the direction of the dog's face and hitting it with a belt. A third security guard appeared in the video with the intention of helping as well. 

The owner was reportedly unresponsive during the entire attack until he was awakened by another witness. Although the owner was able to get control of the dog, who he claimed to be a service animal, he would not cooperate with the library.

"Once alert, he was able to get control of the dog, who he claimed was a service animal. The patron was uncooperative and argumentative with staff following the incident," the library said in a statement to KTVU.

The dog was later removed by Animal Control and its owner was issued a citation by the sheriff's department.

Michael Lambert, a San Francisco librarian, tells KSAZ that the library does not allow pets into the library unless visitors indicate that their pet is a service animal, when the dog is trained to do work for a person with a disability. These rights are protected under the Americans with Disabilities Act.

San Francisco Public Library

San Francisco Public Library (Google Maps)

CLICK HERE TO GET THE FOX NEWS APP

The library is  reviewing its animal policy to best aid its security team in preventing situations like this from happening again. 

The victim is now at home recovering after being taken to hospital following the attack. No one else was harmed during the incident.