OAKLAND (CBS SF) — A police officer shot a male suspect in Oakland Friday night after he allegedly attacked officers when they attempted to detain him for urinating in public, police said.

Officers attempted to detain the man, an Oakland resident, for public urination in the 2100 block of Fruitvale Avenue at around 7:40 p.m.

READ MORE: San Francisco Bans City-Funded Travel To States Over Voting Restrictions

Police said the man became violent, assaulted an officer, and attacked the officers with a long, metal blunt object.

An officer pulled out her firearm and shot the suspect to defend the officers, according to police.

The suspect was taken to Alameda County Medical Center for his injuries and was expected to survive.

READ MORE: UPDATE: Investigation Underway Into Apparent Shooting On I-580 In Oakland

An officer was also injured during the incident. She was taken to Summit Hospital and was treated and released.

Anyone with information regarding this incident is asked to call the department’s homicide section at (510) 238-3821.

MORE NEWS: COVID: Santa Clara County Health Officials Prepare To Vaccinate Kids 5-11 As Authorization Looms

(Copyright 2011 by CBS San Francisco. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)