BERKELEY (CBS SF) — A 31-year-old man faces hate crime and other charges after a brutal attack on another man at a homeless encampment in Berkeley, police said Tuesday.

The attack happened at 9:44 p.m. on July 8 in the area of Shattuck Ave. and Blake St. Berkeley police said the unidentified suspect used the victim’s own guitar to repeatedly strike him in the face, in addition to punching and kicking him.

READ MORE: San Francisco Safeway Adds Barriers To Deter Rampant Shoplifting

During the attack, the assailant made disparaging remarks toward members of the LGBTQ+ community, police said.

The man fled from the area before officers arrived. The victim was taken to a hospital with injuries to his head and upper body.

Witnesses were able to give officers a description of the suspect and provided his nickname, police said. BPD bicycle officers recognized the description of the suspect as someone they were familiar with from their patrols of the Shattuck Ave. corridor.

READ MORE: SF Supervisor Preston Proposes 10-Day Warning Period For Renters Facing Eviction

The next morning, bicycle officers found the suspect, identified only as a 31-year-old man with no address, on the 2500 block of Haste St. and arrested him.

On Monday, the Alameda County District Attorney’s Office charged the suspect with assault with a deadly weapon, a special allegation for causing serious bodily injury, criminal threats and willfully threatening a person based on their perceived characteristics which is considered a hate crime.

Berkeley police defined a hate crime as a crime against a person, group, or property motivated by the victim’s real or perceived protected social group.

MORE NEWS: Redwood City Retail Theft Suspect Arrested; Stolen Home Depot Merchandise Recovered