Liberalism and Nationalism: Allies or Enemies?

Liberals and Nationalists have sometimes shared common aims. But how close are they?

Are their basic philosophies compatible with each other? How has cooperation worked in practice? Why did nineteenth-century Liberals support nationalist movements while their twentieth-century counterparts have tended to oppose them?