The Doctrine of Double Effect is a traditional principle in Roman Catholic moral philosophy, dating at least from the Summa Theologiae of Thomas Aquinas, II-II, Question 64, article 7. It is a set of conditions for a morally permissible action in which a morally questionable consequence is foreseen:

the intended final end must be morally justified

the intended means to the end must be morally justified

the foreseen bad consequence must not itself be intended (willed)

the good end must be proportionate to the bad consequence if it is to justify it

In his work on intentions, Michael Bratman looks back to Anscombe's descriptions of terror bombing in World War II and Bennett's similar cases, to give us the now popular case of the Strategic Bomber versus the Terror Bomber.

Both Terror Bomber
and Strategic Bomber have the goal of promoting the war effort against
Enemy. Each intends to pursue this goal by weakening Enemy, and each
intends to do that by dropping bombs. Terror Bomber's plan is to bomb
the school in Enemy's territory, thereby killing children of Enemy and
terrorizing Enemy's population. Strategic Bomber's plan is different. He
plans to bomb Enemy's munitions plant, thereby undermining Enemy's
war effort. Strategic Bomber also knows, however, that next to the munitions plant is a school, and that when he bombs the plant he will also
destroy the school, killing the children inside. Strategic Bomber has not
ignored this fact. Indeed, he has worried a lot about it. Still, he has
concluded that this cost, though significant, is outweighed by the contribution that would be made to the war effort by the destruction of the
munitions plant.

Now, Terror Bomber intends all of the features of his action just noted:
he intends to drop the bombs, kill the children, terrorize the population,
and thereby weaken Enemy. In contrast, it seems that Strategic Bomber
only intends to drop the bombs, destroy the munitions plant, and weaken
Enemy. Although he knows that by bombing the plant he will be killing
the children, he does not, it seems, intend to kill them. Whereas killing
the children is, for Terror Bomber, an intended means to his end of
victory, it is, for Strategic Bomber, only something he knows he will do
by bombing the munitions plant. Though Strategic Bomber has taken
the deaths of the children quite seriously into account in his deliberation,
these deaths are for him only an expected side effect; they are not — in
contrast with Terror Bomber's position — intended as a means. This,
anyway, seems to be the commonsense view.

This supposed difference between the two bombers is thought by some
to make an important moral difference. In particular, according to the
principle of double effect this difference might make a crucial difference
in the moral permissibility of the bombings. According to this principle
it is sometimes permissible knowingly to bring about (or allow) some
bad effect in the course of achieving some good end, even though it would
not have been permissible to bring about (or allow) that bad effect as
one's intended means to that good end. So it might be permissible for
Strategic Bomber to bomb the plant and yet impermissible for Terror
Bomber to bomb the school, even though in both cases it is known that
the children will be killed and even though both bombing missions make
the same contribution to weakening Enemy.

Of course, one can recognize the commonsense distinction between
intending some means and merely expecting some side effect without
supposing that this distinction can bear so much moral weight. My primary interest here is not in the moral principle but in the commonsense
psychology that underlies it.

(Intentions, Plans, and Practical Reason, CSLI 1999, pp.139-140)

Related to the principle of Double Effect is the famous "Trolley Problem" of Philippa Foot. In an exchange on "Intention and Permissibility," Tim Scanlon and Jonathan Dancy debated the question of whether the permissibility of an action depends on the intentions of the agent.