SAN FRANCISCO—A man attacked a female San Francisco Police Officer near Portsmouth Square on May 28. The San Francisco Policer Officers Association said a staffing shortage resulted in the officer working alone.

The man was seen vandalizing rental scooters, yelling, and threatening people, said witnesses to KTVU. The female police officer confronted the man and asked him to leave the area. The man complied at first, but soon attacked her, according to SFPOA.

“We’ve seen a rise in violent attacks by homeless individuals, including attacks on police officers,” said the SFPOA in a Twitter post. “We are deeply grateful to these citizens who rushed to our officer’s aide. Our staffing shortage left this officer working alone instead of with a partner.”

A video surveillance camera caught the incident which showed the man attacking the officer and multiple bystanders coming to help get the man off her. The officer was able to pin the man to the ground while other officers arrived on scene. The officer was taken to the hospital for non-life-threatening injuries.

The incident is still under investigation by police officials who are trying to determine if this was a possible hate crime, according to the SFPOA.