He served as the junior United States senator from Vermont since 2007 and as U.S. Representative for the state from 1991 to 2007. He is the longest-serving independent in U.S. congressional history. Sanders unsuccessfully sought the Democratic Party nomination for president of the United States in 2016 and 2020, finishing in second place in both campaigns. Before his election to Congress, he was mayor of Burlington, Vermont. .