Police received a call Saturday night of a suspicious person with a gun at Reardon and Kiska roads, police said.
Two Bayview plainclothes officers responded to the call and were investigating the public housing development in that area on foot at about 9:40 p.m. when the suspects began shooting at the officers, Dangerfield said.
The officers - who had not identified themselves as police before the suspects began shooting - identified themselves and one of them returned fire, police said. Neither of the officers was injured and there is no indication that any of the suspects were hit, police said.
Police believe three or four suspects are connected with the exchange of gunfire, Dangerfield said. About three people were detained at the scene and questioned by officers, but it is unknown if they were linked to the shooting, Dangerfield said. No arrests have been made.
The investigation into the gunfire is ongoing and being conducted by the department's Gang Task Force and Homicide units.
The Internal Affairs division is also conducting an administrative investigation in conjunction with the San Francisco District Attorney's Office, which is standard protocol whenever an officer discharges their weapon, Dangerfield said.
Anyone with information about this incident is encouraged to call the San Francisco Police Department at (415) 553-1651 or use the confidential tip line by calling (415) 575-4444.