Ronald Reagan's tenure as the 40th president of the United States began with his first inauguration on January 20, 1981, and ended on January 20, 1989. Reagan, a Republican from California, took office following a landslide victory over Democratic incumbent President Jimmy Carter in the 1980 presidential election. Four years later, in the 1984 election, he defeated Democrat former vice president Walter Mondale to win re-election in a larger landslide. Reagan was succeeded by his vice president, George H. W. Bush. Reagan's 1980 election resulted from a dramatic conservative shift to the right in American politics, including a loss of confidence in liberal, New Deal, and Great Society programs and priorities that had dominated the national agenda since the 1930s. Domestically, the Reagan administration enacted a major tax cut, sought to cut non-military spending, and eliminated federal regulations. The administration's economic policies, known as "Reaganomics", were inspired by supply-side economics. The combination of tax cuts and an increase in defense spending led to budget deficits, and the federal debt increased significantly during Reagan's tenure. Reagan signed the Tax Reform Act of 1986 (which simplified the tax code by reducing rates and removing several tax breaks) and the Immigration Reform and Control Act of 1986 (which enacted sweeping changes to U.S. immigration law and granted amnesty to three million illegal immigrants). Reagan also appointed more federal judges than any other president, including four Supreme Court Justices. Reagan's foreign policy stance was resolutely anti-communist; its plan of action, known as the Reagan Doctrine, sought to roll back the global influence of the Soviet Union in an attempt to end the Cold War. Under this doctrine, the Reagan administration initiated a massive buildup of the United States military; promoted new technologies such as missile defense systems; and, in 1983, undertook an invasion of Grenada, the first major overseas action by U.S. troops since the end of the Vietnam War. The administration also created controversy by granting aid to paramilitary forces seeking to overthrow leftist governments, particularly in war-torn Central America and Afghanistan. Specifically, the Reagan administration engaged in covert arms sales to Iran to fund Contra rebels in Nicaragua that were fighting to overthrow their nation's socialist government; the resulting scandal led to the conviction or resignation of several administration officials. During Reagan's second term, he sought closer relations with Soviet leader Mikhail Gorbachev, and the two leaders signed a major arms control