In November 2015, incumbent Mayor Ed Lee declared that he would stand for reelection for a second term as mayor. State Senator Mark Leno had considered running but ultimately decided against it. Former Mayor Art Agnos, City AttorneyDennis Herrera, Public DefenderJeff Adachi and former State Assemblyman Tom Ammiano all also declined to run. Initially, local media speculated that Lee would run for reelection unopposed. Lee was ultimately opposed by five candidates: Kent Graham, Francisco Herrera, Reed Martin, Stuart Schuffman, and Amy Farah Weiss.
Municipal elections in California are officially non-partisan, though most candidates in San Francisco do receive funding and support from various political parties. Instant-runoff voting, also known as ranked-choice voting, was used in the election. Lee was reelected with a majority of the vote in the first round of votes, and no transferring of votes was required.