Nationalism played a role in sparking World War I since Slavs ruled by Austria-Hungary wanted their own country. Option B is correct.
This fact greatly triggered the development of nationalist ideas, and one of this ideas based on nationalism led to the assassination of the Austrian Archduke, event that immediately fueled the immediate beginning of World War I, a global war arised in Europe that protracted from 28 July 1914 to 11 November 1918.