In The Communist Manifesto, Karl Marx and Friedrich Engels declared that "the working men have no country".  Believing in the inevitability of a worker's revolution that would end capitalism, they maintained national divisions were just another shackle preventing the working class from realising their common interests. Many other Marxist thinkers, especially in the West, have since taken a similar position.
Marx argued that the key organising principle of history was a class struggle over control of the means of production. The struggle is now between the bourgeoisie (middle class) who controlled the means of production and the proletarians (working class) who did the vast majority of the work for which they were not fairly compensated. Across the world, industrial workers shared the experience of alienation - being reduced to mechanical instruments in the production system. As workers have a common experience it is in their interests to unite across national boundaries to overthrow the bourgeoisie and capitalism and claim the means of production for themselves. As class unity is in the objective interest of proletarians, other political loyalties are a distraction which prevent them from realising this. As such the ruling classes have a direct interest in promoting nationalism, alongside other beliefs like religion. Workers who accept the ideology of the ruling class and its legitimacy suffer from false consciousness that prevents them from realising what their true interests are.
It is by no means obvious that class interests are the same across nations. In many cases, workers in one nation seem to benefit from the impoverishment of workers in another. Today, many blame the decline of the American working class on the outsourcing the jobs to other nations like China. National loyalties are simply more important than class loyalties, as nations preserve an innately valuable human cultural difference. It is your duty to be loyal to the nation which has shaped your identity. Suggesting class interests trump any supposed national interests doesn't provide a definition of what a nation is. Many people do feel a strong sense of attachment to "national" communities, something Marxist movements have had to accommodate. In the Austro-Hungarian territories, Marxist parties established separate national wings for the various ethnic groups within the empire to accommodate feelings of cultural difference and argued for cultural autonomy within the movement.
[P1] Class interests and identity are the same across different nations. [P2] National divisions distract the working class from their real interests.
Rejecting the premises
[Rejecting P1] Class interests and identity are not the same across different nations. [Rejecting P2] National interests are more important than class interests.