Demirel was the leader of the opposition from 1971 to 1975 before forming a four-party government known as the First Nationalist Front, which collapsed in 1977. With two other parties, he formed the Second Nationalist Front cabinet in 1977, which collapsed in 1978. Demirel's minority government in 1979 was unable to elect a president in 1980, leading to the 1980 Turkish coup d'état which banned Demirel from politics. In the 1987 constitutional referendum, Demirel regained the right to actively participate in politics and assumed the leadership of the True Path Party. He won the 1991 general election and formed a coalition with the Social Democratic Populist Party (SHP), assuming his fifth and final term as Prime Minister. Following the sudden death of serving President Turgut Özal, Demirel contested the 1993 presidential election and subsequently became the ninth President of Turkey until 2000. With 10 years and 5 months, Demirel's tenure in the prime ministership is the third longest in Turkish history, after İsmet İnönü and Recep Tayyip Erdoğan.