The Fugitive Recovery Enforcement Team operation was carried out throughout the city over a 10-hour period, targeting high-risk probation and parole violators previously convicted of robbery, sex crimes or drug-related offenses, police spokesman Sgt. Wilfred Williams said.
The coordinated effort was conducted by FRET, the gang task force, the San Francisco Sheriff's Department, state parole and probation officers, and the U.S. Marshals Service, according to police.
Four of the 39 arrested were women, police said.
San Francisco police FRET operations are conducted a few times throughout the year, Williams said.
The San Francisco operation was not part of the Bay Area-wide gang raids also conducted Thursday in Alameda, Contra Costa, Marin and Sacramento counties.