Capitalism: All humans have the rights to life, liberty, and property.
Imperialism: We have the right to control you, take your stuff, and kill you if you resist.
Imperialism existed for millennia before the revolutionary modern world of the last few centuries. During the modern era, both capitalism’s liberalism and imperialism’s authoritarianism existed within modernizing societies, both factions fighting for intellectual and policy dominance.
Parallel: Slavery existed for millennia before the revolutionary modern world. During the last few centuries, both capitalism’s liberalism and apologists for slavery existed within modernizing societies, both factions fighting for dominance.
Slavery was defeated relatively quickly (in a mere century or so), while imperialism has declined more slowly—yet the general principles in conflict are the same.