The measure, introduced by Supervisor Ross Mirkarimi, would have required elected officials to reimburse the city for security expenses incurred when campaigning for higher office outside of San Francisco.
It passed with seven votes, one short of the number necessary to override a mayoral veto.
Newsom drew criticism for having a chauffeur and security detail provided by the Police Department accompany him on trips to get married in Montana and around the state during his abandoned campaign for governor.
The mayor has recently been spotted walking around town unaccompanied by police muscle.
But it has often been said that San Francisco is "surrounded on three sides by water and on one side by the United States of America," and even a relatively moderate local politician might bring out the crazy, and potentially violent, in some dangerous lunatic.
Memories of the brutal slayings of Mayor George Moscone and Supervisor Harvey Milk also run deep.
However, at least the city now knows how much it pays for such security, with Police Chief George Gascon who urged the veto revealing over $2 million in annual costs incurred in overtime and other expenses during debate over the proposed law.
Jackson West wishes every San Franciscan who might feel threatened was afforded the option of a police security detail when visiting Montana.