Despite national outrage after a Mexican man killed a woman along a waterfront pier, San Francisco officials upheld the city's strict sanctuary protections for people who are in the country illegally.

The Board of Supervisors voted unanimously on Tuesday for a measure that clarifies when city workers, including police officers, can notify Immigration and Customs Enforcement of a person's immigration status. Generally, the defendant must be charged with a violent crime and is someone who has been convicted of a violent crime within the past seven years.

The measure, however, also grants San Francisco's sheriff leeway to contact immigration authorities in the limited cases of defendants charged with a felony if they have been convicted of other felonies in the past.

The vote comes at a time of deep distrust between law enforcement and minority communities in San Francisco. Last week, the police chief was forced to resign after officers shot to death an unarmed black woman, the third such death since December.

Advocates of sanctuary protections at the board meeting cheered the proposal's passage, even with the discretions given the sheriff. They say that a clear division between local law enforcement and federal immigration authorities is needed to foster trust. The sanctuary law dates back to 1989.

The killing of Kate Steinle in July 2015 and the arrest of Juan Francisco Lopez-Sanchez put San Francisco's leaders on the defensive as critics and outside politicians, including presumptive GOP presidential nominee Donald Trump, called for a change in the city's sanctuary law.

The sheriff at the time, Ross Mirkarimi, cited the law in defending the release of the man, a repeat drug offender and habitual border-crosser. Mirkarimi, already facing tough re-election prospects, lost to a candidate who said she would have considered greater communication between the city and federal government.

That sheriff, Vicki Hennessy, fought the board's original proposal and said her office should have more discretion. As a constitutionally elected officer, she does not have to follow board orders.

Supervisor John Avalos, the measure's chief sponsor, said that a judge must find that the defendant is likely guilty of a violent felony before the rule can kick in. That's a higher standard than a simple charge by the district attorney's office, he said.

"This is actually legislation that sets a clear standard for how we practice our sanctuary-city policies in San Francisco," Avalos said.

Hennessy said she worked on a compromise because she "felt it was better for the city to have one unified policy and still have more options for review than what we have now."

The ordinance allows the sheriff to share release information with ICE if the person is charged with a felony and has been convicted of one serious felony or convicted of three other qualifying felonies within the previous five years.

Hennessey said Tuesday that she would not have contacted ICE in the case of Lopez-Sanchez because he was not wanted on a felony.

"We reached agreement that will serve public safety, family unity and bring our community together," she said.