According to traditional just war theory, a just cause must serve peace and not simply protect an unjust status quo. War must be used as a last resort and all pacifistic approaches must be undertaken. So, if your country is implicated in immoral actions such as oppression of a group of people that terrorist represent, before responding with military action against that group, it is necessary to stop the unjust oppression. If by upholding unjust policies, a society makes peace with a country of people impossible, then military action would just be an extension of that country's unjust policy. This would not be a just war because the reactionary war would be itself an instrument of injustice, and the action would contain an unjust intent.
In “Nipping Evil in the Bud: The Questionable Ethics of Preventative Force”, Douglas P. Lackey holds government responsible for acting militarily when the following conditions are met: it is certain a group of terrorists have the means and intent of attacking, the attack is eminent. He distinguishes between preventative and preemptive basically as whether or not you can prove intention. Lackey makes another assertion. He says that more then proving intent, to legitimize military action, you must prove that military action is the last resort and all other options have been attempted. The logic behind this reasoning is that in the last stages of a plan unfolding, one has the ability
Cited: “Nipping Evil in the Bud: The Questionable Ethics of Preventative Force”, Douglas P. Lackey “Pacifism: Reclaiming the Moral Presumption”, William Hawk