On 22 March 1983, Herzog was elected by the Knesset to serve as the sixth President of Israel, by a vote of 61 to 57, against Menachem Elon, the candidate of the right and the government coalition. He assumed office on 5 May 1983 and served two five-year terms (then the maximum permitted by Israeli basic law), retiring from political life in 1993. As president of Israel, Herzog made a number of visits abroad, being the first Israeli president to make an official visit to Germany, as well as visiting several far-east countries, Australia, and New Zealand. He was also noted for pardoning the Shin Bet agent involved in the Kav 300 affair.