the first war against foreign invaders