Alioto-Pier sued the city after being told she could not seek reelection because she will be termed out of office.
She was appointed by Mayor Gavin Newsom when he became mayor in January 2004.
She was later elected to fill out the two remaining years of that term, then re-elected to a four year term in 2006.
Alioto-Pier said term limits apply only to anyone elected to two four-year terms, but she was only elected to one four year term.