SAN FRANCISCO (KRON) — Hate crime charges were filed against a San Francisco man accused of throwing glass at victims in the Castro neighborhood.

Muhammed Abdullah, 20, followed two men, ages 40 and 58, shouted aggressive anti-LGBTQ+ language at them, and threw a glass object that struck the 40-year-old man, according to police and prosecutors. The incident happened on the afternoon of June 5, on 18th and Hartford streets. Officers found Abdullah in Dolores Park and arrested him after a foot chase.

Prosecutors charged Abdullah with assault with a deadly weapon, battery, violation of a person’s civil rights, and special allegations for hate crimes.

The alleged hate crime occurred while San Francisco is celebrating Pride Month and an LGBTQ+ flag is displayed at City Hall.

“San Francisco is a safe haven for LGBTQ people,” District Attorney Brooke Jenkins said Thursday. “Our city is proud of our diversity and for being an open and welcoming beacon to all people, especially those who have been marginalized elsewhere. Hate crimes that seek to demean and otherize people because of who they are, what they look like, or who they love are unacceptable and will be prosecuted.”

Abdullah was arraigned Wednesday in San Francisco Superior Court. Prosecutors are seeking pre-trial detention with no bail in this case because, according to the District Attorney’s Office, the defendant is a threat to public safety.

“These kinds of attacks are unacceptable,” Police Chief William Scott said. “It’s especially troubling that this incident took place as we celebrate Pride month in San Francisco. Anyone who threatens or harms someone based on being a member of the LGBTQ community will be held accountable.”

Abdullah’s next court appearance is scheduled for June 21 for a preliminary hearing. The judge will also make a ruling over whether to grant bail.

If convicted, Abdullah will face more than 10 years in state prison.