SAN FRANCISCO, Calif. (KRON) – New developments after a shocking attack on a police officer in San Francisco’s Chinatown. 

The city’s police union released video of the assault on Sunday. 

Authorities say the female officer approached the man after he was hurling threats out in the street Friday night.

The man then fought the officer to the ground before witnesses jumped in to help.

The president of the San Francisco Police Officers Association says this would not have happened if there was not a police officer shortage. 

Chinatown has become a hot spot for racially motivated attacks and now this attack comes on an officer trying to keep the area safe.

Witnesses say before the suspect threw the officer to the ground he was spewing racial slurs at people walking along Kearny Street.

“He was saying something about Chinese people, like Chinese don’t belong here or something,” David Yee said. 

David Yee saw the man identified as 33-year-old Gerardo Contreras about an hour before the attack.

Yee says Contreras appeared to be homeless and suffering from a mental episode before an unidentified officer tried to detain him. 

Witnesses rushed to the officer’s aid, striking and pulling at Contreras while the officer was pinned down.

Backup was later seen running to help and arrested Contreras.

“A little shocked. Like he was attacking a police officer and if he can attack a police officer what would stop him from attacking a civilian?” Yee said.

“This just goes to show you that police officers are not immune to random acts of violence,” Dustin Derollo said.

Leadership within San Francisco’s Police Officers Association is concerned with a lack of prosecuting and a lack of staffing is creating situations like this and making the city unsafe. 

The SFPOA estimates there’s around 230 vacancies within the department.

The union says because of failed policies this officer was working alone and faced a struggle for her life. They fear these problems will continue.

“It’s unfortunate she didn’t get additional injuries or worst case scenario death,” Derollo said.

KRON4 has learned that the officer was taken to the hospital with minor injuries. She has since been released.

At this time, Contreras remains in the San Francisco County Jail.