Modern Croatian nationalism first arose in the 19th century after increasing pressure for Magyarization and started to grow especially after the April Laws that ignored Croatian autonomy under Hungarian Kingdom. It was based on two main ideas: a historical state right based on a continuity with the medieval Croatian state and an identity associated with the Slavs. This period started with the Illyrian movement, which created the Matica hrvatska  and promoted "Illyrian" language. Illyrianism spawned two political movements: the Party of Rights named after the state right concept (pravaštvo), led by Ante Starčević, and the Yugoslavism under Josip Juraj Strossmayer, both of which were limited to intelligentsia.
Advocacy in favour of Yugoslavism as a means to achieve the unification of Croatian lands in opposition to their division under Austria-Hungary began with Strossmayer advocating this as being achievable within a federalized Yugoslav monarchy.
After the foundation of Yugoslavia in 1918, a highly centralized state was established in the St. Vitus Day Constitution of 1921 in accordance with Serbian nationalist desires to ensure the unity of the Serbs, this caused resentment amongst Croats and other peoples in Yugoslavia. Dalmatian Croat and the principal World War I-era Yugoslavist leader Ante Trumbić denounced the St. Vitus Day Constitution for establishing a Serb hegemony in Yugoslavia contrary to the interests of Croats and other peoples in Yugoslavia. Croatian nationalists opposed the centralized state with moderate nationalists demanding an autonomous Croatia within Yugoslavia. Croatian nationalism became a mass movement in the Kingdom of Yugoslavia through Stjepan Radić's Croatian Peasant Party. The demand by moderate Croatian nationalists for an autonomous Croatia within Yugoslavia was accepted by the Yugoslav government in the Cvetković–Maček Agreement of 1939. The agreement angered Serbian nationalists who opposed the agreement on the grounds that it weakened the unity of Serbdom in Yugoslavia, asserting its importance to Yugoslavia with the slogan "Strong Serbdom, Strong Yugoslavia". The agreement also angered Bosniaks (then known as Yugoslav Muslims), including the Yugoslav Muslim Organization (JMO) that denounced the agreement's partition of Bosnia and Herzegovina.
A violent sectarian Croatian nationalism developed prior to World War II within the Ustaše movement of Ante Pavelić, which in turn collaborated with Nazi Germany and Fascist Italy in the Independent State of Croatia during World War II. Croatian nationalism then became largely dormant, except for the Croatian Spring, until the breakup of Yugoslavia and the Croatian War of Independence. In its more extreme form, Croatian nationalism is personified by the desire for the establishment of a Greater Croatian state, the idealization of the peasant and of patriarchal values, as well as anti-Serb sentiment.
In the 19th century, opposition by Croats to Magyarization and desire for independence from Austria-Hungary led to the rise of Croatian nationalism. The Illyrian movement sought to awaken Croatian national consciousness and a standardize regional literary traditions which existed in a various dialects on a single literary language. Once the Croatian lands were culturally unified, the movement aimed at unifying the rest of the South Slavs under the resurrected Illyrian name. Illyrianists during the Revolutions of 1848 sought to achieve political autonomy of Croatia within a federalized Habsburg monarchy. Ante Starčević founded the Party of Rights in Croatia in 1861 that argued that legally, Croatia's right of statehood had never been abrogated by the Habsburg monarchy and thus Croatia was legally entitled to be an independent state. Starčević regarded Croatia to include not only present-day Croatia but also what is now Bosnia and Herzegovina, Slovenia (Duchy of Carinthia, Carniola, Styria) and parts of Serbia (Sanjak of Novi Pazar, Syrmia)—all people in this Greater Croatia whether Catholic, Muslim, or Orthodox were defined as Croats.
During the 19th to mid-20th century Croatian nationalists competed with the increasingly Pan-Slavic Illyrian movement and Yugoslavists over the identity of Croats. The founder of Yugoslavism, Croatian Bishop Josip Juraj Strossmayer advocated the unification of Croat lands into a Yugoslav monarchical federal state alongside other Yugoslavs. However, in spite of both Starčević's and Strossmayer's competing visions of identity, neither of their views had much influence beyond Croatia's intelligentsia.
Croatian nationalism became a mass movement under the leadership of Stjepan Radić, leader of the Croatian People's Peasant Party after 1918 upon the creation of Yugoslavia. Radić opposed Yugoslav unification, as he feared the loss of Croats' national rights in a highly centralized stated dominated by the numerically larger Serbs. The assassination of Radić in 1928 provoked and angered Croatian nationalists with the centralized Yugoslav state, and from 1928 to 1939, Croatian nationalism was defined as pursuing either some form of autonomy or independence from Belgrade. In 1939, a compromise between the Yugoslav government and the autonomist Croatian Peasant Party led by Vladko Maček was made with the creation of an autonomous Croatia within Yugoslavia known called the Banovina of Croatia.
Croatian nationalism reached a critical point in its development during World War II, when the Croatian extreme nationalist and fascist Ustaše movement took to governing the Independent State of Croatia (NDH) after the invasion of Yugoslavia by the Axis Powers and the creation of the NDH at the behest of Fascist Italy and Nazi Germany as an Italo-German client state. The Ustaše committed mass genocide against Serbs, Jews and Roma, and persecuted political opponents, including the communist Yugoslav Partisans and Chetniks who fought against them.
After the defeat of the Axis Powers in 1945 and the rise of communist Josip Broz Tito as leader of a new communist-led Yugoslavia, Croatian nationalism along with other nationalisms were suppressed by state authorities. During the communist era, some Croatian communists were labeled as Croatian nationalists, respectively Ivan Krajačić and Andrija Hebrang. Hebrang was accused by Serbian newspapers that he had influenced Tito to act against Serbian interests, in reality Tito and Hebrang were political rivals, since Hebrang advocated Croatian interests at the federal level and was one of the major Yugoslav Partisan leaders. Hebrang also advocated change of Croatian borders, since, according to him, Croatian boundaries were clipped by Milovan Đilas' commission. He also argued against unfair exchange rates imposed on Croatia after 1945 and condemning show trials against people labeled as collaborationists. Hebrang wasn't a serious threat to Serbian interests, since he was demoted several times and in 1948 he was put under house arrest, and later killed.
Croatian nationalism did not disappear but remained dormant until the late 1960s to early 1970s with the outbreak of the Croatian Spring movement calling for a decentralized Yugoslavia and greater autonomy for Croatia and the other republics from federal government control. These demands were effectively implemented by Tito's regime. Croatian communists started to indicate on Serbian dominance in commanding party posts, posts in the army, police and secret police. However, main subject was the perceived subordinate status of the Croatian literary language, at that time regarded as a Western variety of Serbo-Croatian. In 1967 Croatian Writers' Association called for designation of Croatian language as a distinct language both for educational and publishing purposes. Because of such demands Tito gave an order to purge reformers in 1971 and 1972. Some 1,600 Croatian communists were ejected from the Communist Party or arrested.
Such measures stopped the rise of nationalism in Yugoslavia, but Croatian nationalism continued to grow among Croat diaspora in South America, Australia, North America and Europe. Croatian political emigration was well-financed and often closely co-ordinated. Those groups were anti-communist since they originate from political emigrants who left Yugoslavia back in 1945.
Croatian nationalism revived in independentist form in the late 1980s in response to the threat of the Serbian nationalist agenda of Slobodan Milošević who sought Greater Serbia. Croatia declared independence from Yugoslavia in 1991 leading to the Croatian war of independence from 1991 to 1995.
Beginning in the 1980s, the Croatian nationalist movement was led by former communist general and historian Franjo Tuđman. Tuđman was, at first, a prominent communist, but in the 1960s he began to embrace nationalism. He soon earned the favour of the Croat diaspora, helping him to raise millions of dollars toward the goal of establishing an independent Croatia. Tuđman gathered MASPOK intellectuals and sympathisers from among diaspora Croats and founded the Croatian Democratic Union (HDZ) in 1989. In 1990, Tuđman's HDZ won on first free elections in Socialist Republic of Croatia.