During the Croatian Spring of the 1960s and 1970s, Mesic promoted the Croatian Nationalist movement against Tito and was jailed in 1971 for one year in the Stare Gradiška prison. After his sentence was over, Mesic joined Franjo Tudjman's National Democratic Union (HDZ) as secretary, later becoming Croatia's first prime minister (in the Yugoslavian Federation) in 1990. He is credited with helping to create the first independent Croatian government since the middle ages. The next year, he was appointed to the rotating presidency of the Socialist Federal Republic of Yugoslavia (SFRY), but quickly withdrew from the post under criticism from Serbians when Croatia declared independence on 5 December 1991. He was made speaker of the Croatian Parliament (Assembly of Sabor) in 1992, but became increasingly disenchanted with Tudjman's authoritarian style of government. By 1994, Mesic had withdrawn from the HDZ with other top officials, creating the Croatian Independent Democrats (HND), which split in 1997, part of which helped to build the Croatian People's Party (HNS). Mesic presided over the Zagreb branch of the HNS and was vice president of the entire HNS until he was elected president of the Republic of Croatia in February 2000.