There were two statewide elections held in Pennsylvania in 2010. In the election for United States Senate, Republican nominee Pat Toomey garnered about 2.2 million votes (51%), defeating Democrat Joe Sestak, who garnered about 1.9 million votes (49%). Sestak had defeated incumbent Senator Arlen Specter in the Democratic primary after Specter, who had been a Republican since his election to the Senate in 1980, switched his partisan affiliation to Democratic. Specter's partisan defection had briefly given Democrats control of both of Pennsylvania's Senate seats for the first time since before the Civil War. In the gubernatorial election, Tom Corbett garnered about 2.1 million votes (54.5%), defeating Democrat Dan Onorato, who garnered about 1.8 million votes (45.5%).