He was the fifth Prime Minister of Israel from 1974 until 1977 and again from 1992 until his assassination in 1995 by Yigal Amir , a right-wing activist who had strongly opposed Rabin 's signing of the Oslo Accords and to peace with Palestine . He was the fifth Prime Minister of Israel , serving two terms in office , 1974 â `` 1977 and 1992 until his assassination in 1995 .