He became leader of the League of Communists of Slovenia in 1986, and sought to increase political freedoms. In 1990 he was elected president of the presidency of Slovenia. After independence in 1992, he was popularly elected as the President of Slovenia. He won another five year term in 1997, and stood down in 2002. During his time a president, he was not a member of any political party. He was succeeded by Janez Drnovšek.