The 1977 Knesset elections marked a major turning point in Israeli political history as Menachem Begin's Likud party took control from the Labor Party. Later that year, Egyptian President Anwar El Sadat made a trip to Israel and spoke before the Knesset in what was the first recognition of Israel by an Arab head of state. In the two years that followed, Sadat and Begin signed the Camp David Accords (1978) and the Israel–Egypt Peace Treaty (1979). In return, Israel withdrew from the Sinai Peninsula, which Israel had captured during the Six-Day War in 1967, and agreed to enter negotiations over an autonomy for Palestinians in the West Bank and the Gaza Strip.