Slovenian nationalism is the nationalism that asserts that Slovenes are a nation and promotes the cultural unity of Slovenes. Slovenian nationalism first arose in response to the influx of ideas of nationalism from the French Revolution that arrived in Slovenia when the French forces of Napoleon Bonaparte made Slovenia part of the Illyrian Provinces from 1809 to 1813. Slovenian nationalists such as Anton Korošec endorsed Yugoslav unification during World War I as a means to free Slovenia from Austro-Hungarian rule.
On 8 May 1989, after the legalization of other political parties by Slovenia's reformist Communist Party-led government, new political parties published the May Declaration, demanding the formation of a sovereign, democratic, and pluralist Slovenian state. A referendum on independence from Yugoslavia was held on 26 December 1990 with a majority of Slovenians supporting independence. Slovenia declared independence on 25 June 1991.
Following independence, members of minority groups – mostly from other former Yugoslav nations – who had failed to apply for residency in the new nation had their records stricken, leaving them in the country illegally.