She was elected Attorney General of California in 2010 and re-elected in 2014. Harris served as the junior United States senator from California from 2017 to 2021. Harris defeated Loretta Sanchez in the 2016 Senate election to come to be the second African American woman and the initial South Asian American to provide in the United States Senate.