A 49-year-old man was arrested Tuesday after allegedly attacking a resident and employee at a building in San Francisco’s South of Market neighborhood, as well as three police officers who responded to the scene, police said today.

The suspect, who has not been identified, had apparently sought to commit suicide by getting shot by officers who came at about 5 p.m. Tuesday to an apartment in the first block of Perry Street where multiple assaults had been reported, according to police.

When the officers initially arrived, they found a resident who said her neighbor had knocked on her door, then forced his way into her apartment and struck her in the face, police said.

The suspect then went back into the hallway and confronted the building manager, who was trying to intervene. The suspect kicked the building manager several times until another employee stopped the attack, police said.

The suspect then fled from the building, but later returned after police had responded to the scene.

He encountered an officer in the third floor hallway, where he concealed his right hand and yelled “I have a gun and I’m going to use it,” police said.

Believing the suspect was armed, the officer took out his handgun and called for backup.

The officer’s partner arrived and grabbed the suspect from behind, tackling him to the ground, according to police.

The officers violently struggled to try to take the man into custody. He allegedly tried to bite one of the officers and spit in the other’s face, then told them he had a communicable disease, police said.

One of the officers used his pepper spray on the suspect but it had no apparent effect, according to police.

Other officers then arrived, one of whom punched the suspect several times with a closed fist, helping them finally take him into custody, according to police.

Police released information about the incident after ABC7 obtained a video of the arrest that shows an officer repeatedly punching the suspect.

During the struggle, one of the officers hit his head on a wall, suffering a contusion, while a second suffered numerous abrasions and scratches. The third officer who punched the suspect suffered serious injuries to his hand and was treated at a hospital, police said.

Investigators determined that the suspect had posted on a social networking website saying he was going to try to get police officers to shoot him, according to police.

Police said he wrote, “I’m gonna check out. Tonight is the night,” and “OK, the cops are coming here, I’m gonna pretend to have a gun and they will shoot me, remember the movie Butch Cassidy.”

The suspect was taken to a hospital for mental evaluation. After being medically cleared, he will be booked into jail on suspicion of felony threats against a public official, felony battery on a police officer, resisting arrest and two counts of misdemeanor battery, police said.

Dan McMenamin, Bay City News

Want more news, sent to your inbox every day? Then how about subscribing to our email newsletter? Here’s why we think you should. Come on, give it a try.

Please make sure your comment adheres to our comment policy. If it doesn't, it may be deleted. Repeat violations may cause us to revoke your commenting privileges. No one wants that!