In 2008, Aguirre ran for a second term as City Attorney but was challenged by several other candidates. The president of the San Diego City Council Scott Peters ran with the backing of city unions, while Superior Court Judge Jan Goldsmith was backed by the Republican political establishment. In the five-candidate nonpartisan primary election in June 2008, Aguirre qualified for the general election by coming in second place after Goldsmith. In the general election on November 4, 2008, Aguirre lost to Goldsmith: 59.5 percent to 40.5 percent.