Many historians believe that Nationalism started after/during the French Revolution where the people wanted to fight off Austria, at that time nobody wanted a king or tyrant to tell them what to do after just getting rid of one. People wanted to fight for their country as ONE, to be strong together rather than fighting for a king.
You should read Imagined Communities by Benedict Anderson. He theorizes about nationalism in the long duree of history (I can't remember what specifically he says about your question)