It was a just war.
Understood, but that doesn't mean by definition that every application of military force within that war is morally legitimate.