Dog seen on video attacking security guard at San Francisco's Main Library

A security guard working at San Francisco's Main Library was viciously attacked by a visitor's dog Sunday evening, public library officials confirmed.

Kate Patterson, a spokesperson for San Francisco Public Library, said the incident happened inside the library around 5:40 p.m. when witnesses observed the dog barking next to its owner who appeared to be unresponsive at a computer kiosk.

Patterson said the dog was "not on a leash and was exhibiting aggressive behavior."

Two security guards attempted to approach the unresponsive man to potentially administer Narcan, used to reverse overdoses from opioids.

"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.

Another patron inside the library recorded video of the incident and posted it to social media.

During the struggle, two other guards tried to intervene and rescue their colleague.

Library officials said the dog's owner was "largely unresponsive during the attack" until another patron woke him up.

"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.

No one else was harmed during the incident.

The sheriff's department issued the dog's owner a citation. Animal Control came and removed the dog.

The library said it is reviewing its service animal policy and seeking additional resources for its security staff to help deescalate aggressive behavior from dogs.

"The safety of our patrons and staff are of the utmost importance, and we are doing everything we can to ensure that this never happens again," the library said.