Blog

What the City Attorney does for the city

The elected lawyer for the whole city and county: who the client is, what the office drafts and defends, and how the 2004 marriage litigation showed its reach.

Who is the lawyer for the mayor, for the Board of Supervisors and for the Department of Public Works? In San Francisco it is one and the same person: the City Attorney. The office is elected, filled by a citywide vote, and its holder (David Chiu, as of 2026) heads a legal shop that serves the entire City and County. That design is deliberate, and it explains a good deal about how city government behaves when its parts disagree.

An elected lawyer, on purpose

Charter Section 6.102 designates the City Attorney as the legal representative of the city as a whole. The Good Government Guide, which the office publishes, quotes the reason from a 1933 commentary on the Charter of 1931: if the office were appointive, whether by a mayor or a chief administrative officer, its holder "would be exposed to the possibility of conflicting allegiances." Electing the City Attorney, the idea goes, ensures the office serves the people of San Francisco rather than any particular official.

A second argument is practical. With one City Attorney, the city speaks with one voice on legal questions and avoids the chaos and the taxpayer expense that would follow if each department could hire its own counsel to argue its own view of the city's interests.

The office is in City Hall, Room 234, at 1 Dr. Carlton B. Goodlett Place, and also at Fox Plaza, 1390 Market Street, on the seventh floor. The main number is 415-554-4700.

The client is the city, not the official

The single most important idea in the office's own guidance is that the City as a whole is the client. A mayor, a supervisor, a commission or a department head acts for the city and receives legal advice in that capacity. None of them is a separate client.

That has consequences that surprise people:

  • No conflict in advising both sides of a city dispute. The City Attorney can advise the mayor and the Board even when they disagree about whether an ordinance is lawful. The Guide cites an opinion of the State Bar of California saying a city attorney asked to advise both a mayor and a city council on the power to adopt an ordinance has no conflict of interest, because both have a role in speaking for the city, and neither may sue the other over it.
  • Different deputies, different positions. A Deputy City Attorney assigned to a department may be asked to draft an ordinance for a supervisor that the department opposes. The same office may draft two ordinances on the same subject for two different supervisors whose goals clash. These are not conflicts, the Guide says, because all of them are parts of the same client.
  • The same advice to everyone who asks. If two officers ask for confidential advice on the same question, they get the same answer.
  • Confidences are respected within government where possible. If a city official asks that a request not be shared, the office honors the request to the extent it can, so that officials can seek advice without fear it will be passed to a rival. But the office cannot withhold that same advice from other officers acting for the city, and when a supervisor asks for an ordinance the office believes raises serious legal problems, the office tells the sponsor and also gives the full Board and the mayor the same advice if the ordinance is introduced.

The one-client rule has a few exceptions. By contract, the City Attorney sometimes represents separate legal entities related to the city, such as the County Transportation Authority or the Successor Agency to the Redevelopment Agency. And as state law requires, the office sometimes represents city officers and employees in their individual capacities when they are sued in tort for acts within the scope of their city jobs.

What the office does

According to the Charter section the Guide cites, the office represents the city and its officers and employees in lawsuits, drafts and approves legislation, contracts and other documents, and provides legal advice. In ordinary terms, that comes to four kinds of work.

Writing and reviewing the law. Many ordinances and charter amendments pass through the office before they reach a vote. The text of the June 2026 charter amendment on term limits, for example, carried the City Attorney's approval as to form. See Proposition B and the move to lifetime term limits.

Advising departments and commissions. Each department or commission has an assigned Deputy City Attorney who becomes expert in the laws that govern it. The office also publishes written opinions and memoranda on its website.

Litigation. The office defends the city when it is sued and brings suits on the city's behalf.

Ethics and open-government advice. Officials seeking guidance on conflicts of interest, gifts and the open-meeting and records laws may ask the office, and the Good Government Guide is its reference to those laws. The office also serves as the Supervisor of Records under the Sunshine Ordinance, one of the places a records requester can appeal a denial. See The Sunshine Ordinance, the city's open-government law.

The Good Government Guide

The office's best-known public product is the Good Government Guide, "An Overview of the Laws Governing the Conduct of Public Officials," last updated in April 2026. It runs to more than 200 pages and is written for commissioners, department heads, elected officials and staff, though anyone can read it. It has three parts:

  1. Serving on a board or commission. How commissions are created and filled, residency and term rules, oaths, attendance, removal, the role of the department head and the City Attorney, quorum and voting, and the charter's ban on Board of Supervisors interference in administration. Who appoints San Francisco's commissions draws on this part.
  2. Conflicts of interest, financial disclosure and governmental ethics. The state's Political Reform Act, Government Code section 1090 on contracts, the city's own Campaign and Governmental Conduct Code, gift limits, restrictions on future employment, behested payments and whistleblower protections. One example from this part: a city contractor with a contract worth $100,000 or more in a fiscal year may not make a campaign contribution to an elected officer who would have to approve the contract, from the time a proposal is submitted until 12 months after approval.
  3. Public records and meetings laws. The Brown Act, the Public Records Act and the Sunshine Ordinance, with the deadlines and the public comment rules. an immediate disclosure request, step by step and How to follow the Board of Supervisors from home use it.

The Guide's own introduction asks every new official to read it on taking office and to reread it each year, and it is blunt about its limits: no publication can substitute for applying the law to specific facts, and officials with a particular situation should talk to the Deputy City Attorney assigned to their department before acting.

Privilege and screens

Since the city is the client, the legal advice it receives is confidential and privileged, and only the city, acting through the body or office the advice was directed to, can waive that privilege. A commission can waive it only at a properly noticed public meeting, and the Guide recommends commissioners confer with the City Attorney first. Unauthorized disclosure of privileged information can lead to penalties for the individual: the Campaign and Governmental Conduct Code allows administrative penalties, civil penalties of up to $5,000 per violation and criminal penalties.

The office also uses what it calls due process screens. When a board or commission is deciding a matter such as an appeal of a permit or a tax assessment, one group of lawyers advises the body and a separate group represents the department presenting the matter. The two groups do not share information about the pending case. Legal ethics do not require the screen (the city is still the client on both sides), but it protects the interests of the person appearing before the body.

A case in point: the 2004 marriage licenses

The clearest example of what an elected city lawyer can do is the litigation over same-sex marriage. In February 2004 the city began issuing marriage licenses to same-sex couples. The city's own account, posted on sf.gov, records the legal sequence:

  • February 17, 2004: the City Attorney's office defeated an immediate restraining order in San Francisco Superior Court, and marriages continued; about 4,000 couples wed in the period, by the city's count (other counts run somewhat lower).
  • February 19, 2004: the City Attorney filed a cross-complaint against the State of California over its marriage laws, which the city's account calls the first government challenge to anti-gay marriage laws in U.S. history.
  • March 11, 2004: the California Supreme Court ordered the city to stop issuing licenses and left the constitutional question for a separate case. Within hours the City Attorney filed a new complaint against the state in Superior Court.
  • August 12, 2004: the California Supreme Court held that the mayor and other officials lacked the authority to issue the licenses, invalidating the ones issued.
  • March 2005: a Superior Court judge held California's marriage laws violated the state constitution's equal protection clause.
  • October 10, 2006: a split Court of Appeal panel upheld the laws, in the case known as In re Marriage Cases, and the state Supreme Court agreed in December to review it.
  • May 15, 2008: the California Supreme Court held that excluding same-sex couples from marriage violated state constitutional rights to privacy, liberty and equal protection. The decision became final in mid-June 2008, and weddings resumed in San Francisco and across the state.

Whatever one thinks of the underlying issue, the sequence shows how the office works: it took an action by city officials, defended it, then pursued the constitutional question through the state courts for four years.

How a lawsuit by or against the city starts

A suit against the city starts the way any California civil suit does, with a complaint filed in court and served on the city. For claims for money or damages, state law generally requires a written claim to be presented to the public entity first, within deadlines set by statute, before a suit may be filed; the city's instructions for filing a claim are on sf.gov. Once a suit is filed, the City Attorney's Office appears for the city. When the city is the one suing, the office files the complaint, as it did in 2004.

For a resident, the two most practical contacts are the City Attorney's main line, 415-554-4700, and the whistleblower channel. The Good Government Guide lists the City Attorney, along with the Controller and the District Attorney, as places a whistleblower can contact. See The Controller's reports and the City Survey for the Controller's program, and City Attorney for the quick reference. The City Attorney's page on sf.gov lists current legal opinions and publications.

Related city government

Related guides

Latest on this topic