Was imperialism an inevitable consequence of capitalism? Why or why not?

Was imperialism an inevitable consequence of capitalism? Why or why not?