Nationalism: history or the state

What is more important to explain nationalism: history or the state? (cite at least 2 case studies)