In a welcome sign of preserving our civic values, the San Francisco Board of Supervisors on Tuesday affirmed The City’s sanctuary city policy, which prohibits city departments from cooperating with federal immigration efforts in almost all cases. The supervisors rightly stood up for The City’s long-held conviction that the policy works to create safer and more peaceful communities.

The board unanimously approved Supervisor David Campos’ resolution calling on the Sheriff’s Department not to cooperate with the federal government’s Priority Enforcement Program, which requests local law enforcement notify ICE when undocumented immigrants are released from jail custody. And in a narrow 6-5 vote, the board rejected Supervisor Mark Farrell’s resolution calling on San Francisco Sheriff Ross Mirkarimi to reverse his policy forbidding deputies from contacting federal immigration officials unless authorized.

Both votes, nonbinding but carrying powerful symbolic value, come at a politically charged time for the sanctuary city law in San Francisco, months after the shooting death of Kathryn Steinle, 32, on Pier 14, allegedly by an undocumented immigrant, and just weeks before municipal elections, in which Mirkarimi is running for reelection.

Steinle’s killing and The City’s staunch refusal to abide by federal immigration policy has provoked outrage from Republican presidential hopefuls and conservative pundits this season. Her death has become a talking point by right wing opponents of sanctuary cities nationwide.

Locally, the issue has been used by Mayor Ed Lee and his allies to accuse Mirkarimi of negligence for not contacting federal authorities about the shooting suspect’s status, inferring that if he had been deported then Steinle might still be alive. Mirkarimi claims that without a violent felony conviction on the suspect’s record, such communication would have been a violation of city law and the constitutional rights governing due process.

Steinle’s death, killed apparently at random on the pier, was heartbreaking, but one terrible incident does not repudiate the wisdom of a sanctuary city policy to make The City safer overall and its policies more humane.

The board’s affirmation of the existing policies this week serves as a rebuke to the mayor, also up for reelection but expected to win easily, and his supporters who have sought to use the incident to sully the competency of the sheriff. We applaud the supervisors, or at least the six who voted against Farrell’s resolution, for not playing politics with such an essential part of The City’s character: Our vow to care for and offer services to all people who find themselves within our borders.

Sanctuary city advocates believe communities are safer and healthier if those who live in them feel free to talk with the police, go to the hospital or attend school without worry of being questioned about their legal status. The entire city is strengthened when all inhabitants can participate in daily civic life without this fear. That is why The City has proudly declared itself a sanctuary city for the past three decades, and it’s meaningful that the board voted to stand by its principals, especially at a time when critics are speaking loudly.

As Supervisor Malia Cohen forcefully argued in the chambers before the vote: “We cannot allow one event to dictate 25 years of our city’s policies towards undocumented immigrants in our city.”

The decision to stand by The City’s current policy came on the same day that U.S. Senate Democrats blocked a Republican bill that would have cut off federal funding for sanctuary cities around the country.

San Francisco has long prided itself on its leadership nationally in the arena of immigrant rights. After Tuesday’s vote in favor of The City’s strong policy to protect residents from federal immigration raids and interrogations about legal status, it can still do so.