Dianne Feinstein became mayor pro-tem of the City and County of San Francisco, California on December 4, 1978, following the Moscone–Milk assassinations in which her predecessor in office, George Moscone and fellow member of the San Francisco Board of Supervisors, Harvey Milk, were assassinated by former supervisor Dan White.
At the age of 45, Feinstein became the first female mayor of the municipality, and was formally elected to the position on November 4, 1979 and re-elected in 1983. She was prevented from seeking a third term in office and was succeeded in 1987 by Art Agnos.
https://en.wikipedia.org/wiki/Mayoralty_of_Dianne_Feinstein