The conditions for Just War have been debated for centuries: it must be fought by a legal and recognized authority, eg, a government. The cause of the war must be just. The war must be fought with the intention to establish good or correct evil, and there must be a reasonable chance of success. The war must be the last resort (after all diplomatic negotiations have been tried and failed), and only sufficient force must be used. Civilians should not be involved or targeted.
One of the first philosophers discussing the conditions for just war is Marcus Tullius Cicero (106 – 43 BCE). He is generally considered to be one of the founders of just war theory. The following excerpts are from his text De officiis. (On Moral Duties.)
De officiis (On Moral Duties), 1.11.33-1.13.41, 3.29.107.
11. Again, there are certain duties that we owe even to those who have wronged us. For there is a limit to retribution and to punishment; or rather, I am inclined to think, it is sufficient that the aggressor should be brought to repent of his wrong-doing, in order that he may not repeat the offence and that others may be deterred from doing wrong.
 Then, too, in the case of a state in its external relations, the rights of war must be strictly observed. For since there are two ways of settling a dispute: first, by discussion; second, by physical force; and since the former is characteristic of man, the latter of the brute, we must resort to force only in case we may not avail ourselves of discussion.
 The only excuse, therefore, for going to war is that we may live in peace unharmed; and when the victory is won, we should spare those who have not been blood-thirsty and barbarous in their warfare. For instance, our forefathers actually admitted to full rights of citizenship the Tusculans, Aequians, Volscians, Sabines, and Hernicians, but they razed Carthage and Numantia to the ground. I wish they had not destroyed Corinth; but I believe they had some special reason for what they did — its convenient situation, probably — and feared that its very location might some day furnish a temptation to renew the war. In my opinion, at least, we should always strive to secure a peace that shall not admit of guile. And if my advice had been heeded on this point, we should still have at least some sort of constitutional government, if not the best in the world, whereas, as it is, we have none at all.
Not only must we show consideration for those whom we have conquered by force of arms but we must also ensure protection to those who lay down their arms and throw themselves upon the mercy of our generals, even though the battering-ram has hammered at their walls. And among our countrymen justice has been observed so conscientiously in this direction, that those who have given promise of protection to states or nations subdued in war become, after the custom of our forefathers, the patrons of those states.
 As for war, humane laws touching it are drawn up in the fetial code of the Roman People under all the guarantees of religion; and from this it may be gathered that no war is just, unless it is entered upon after an official demand for satisfaction has been submitted or warning has been given and a formal declaration made. Popilius was general in command of a province. In his army Cato’s son was serving on his first campaign. When Popilius decided to disband one of his legions, he discharged also young Cato who was serving in that same legion. But when the young man out of love for the service stayed on in the field, his father wrote to Popilius to say that if he let him stay in the army, he should swear him into service with a new oath of allegiance, for in view of the voidance of his former oath he could not legally fight the foe. So extremely scrupulous was the observance of the laws in regard to the conduct of war.
 There is extant, too, a letter of the elder Marcus Cato to his son Marcus, in which he writes that he has heard that the youth has been discharged by the consul [Lucius Aemilius Paulus (B.C. 168)], when he was serving in Macedonia in the war with Perseus. He warns him, therefore, to be careful not to go into battle; for, he says, the man who is not legally a soldier has no right to be fighting the foe.
12. This also I observe — that he who would properly have been called “a fighting enemy” (perduellis) was called “a guest” (hostis), thus relieving the ugliness of the fact by a softened expression; for “enemy” (hostis) meant to our ancestors what we now call “stranger” (peregrinus). This is proved by the usage in the Twelve Tables: “Or a day fixed for trial with a stranger” (hostis). And again: “Right of ownership is inalienable for ever in dealings with a stranger” (hostis). What can exceed such charity, when he with whom one is at war is called by so gentle a name? And yet long lapse of time has given that word a harsher meaning: for it has lost its signification of “stranger” and has taken on the technical connotation of “an enemy under arms.”
 But when a war is fought out for supremacy and when glory is the object of war, it must still not fail to start from the same motives which I said a moment ago were the only righteous grounds for going to war. But those wars which have glory for their end must be carried on with less bitterness. For we contend, for example, with a fellow-citizen in one way, if he is a personal enemy, in another, if he is a rival: with the rival it is a struggle for office and position, with the enemy for life and honour. So with the Celtiberians and the Cimbrians we fought as with deadly enemies, not to determine which should be supreme, but which should survive; but with the Latins, Sabines, Samnites, Carthaginians, and Pyrrhus we fought for supremacy. The Carthaginians violated treaties; Hannibal was cruel; the others were more merciful. From Pyrrhus we have this famous speech on the exchange of prisoners:
“Gold will I none, nor price shall ye give; for I ask none;
Come, let us not be chaff’rers of war, but warriors embattled.
Nay; let us venture our lives, and the sword, not gold, weigh the outcome.
Make we the trial by valour in arms and see if Dame Fortune
Wills it that ye shall prevail or I, or what be her judgment.
Hear thou, too, this word, good Fabricius: whose valour soever
Spared hath been by the fortune ofwar— their freedom I grant them.
Such my resolve. I give and present them to you, my brave Romans;
Take them back to their homes; the great gods’ blessings attend you.”
A right kingly sentiment this and worthy a scion of the Aeacidae.
13.  Again, if under stress of circumstance individuals have made any promise to the enemy, they are bound to keep their word even then. For instance, in the First Punic War, when Regulus was taken prisoner by the Carthaginians, he was sent to Rome on parole to negotiate an exchange of prisoners; he came and, in the first place, it was he that made the motion in the Senate that the prisoners should not be restored; and in the second place, when his relatives and friends would have kept him back, he chose to return to a death by torture rather than prove false to his promise, though given to an enemy.
 And again in the Second Punic War, after the Battle of Cannae, Hannibal sent to Rome ten Roman captives bound by an oath to return to him, if they did not succeed in ransoming his prisoners; and as long as any one of them lived, the censors kept them all degraded and disfranchised, because they were guilty of perjury in not returning. And they punished in like manner the one who had incurred guilt by an evasion of his oath: with Hannibal’s permission this man left the camp and returned a little later on the pretext that he had forgotten something or other; and then, when he left the camp the second time, he claimed that he was released from the obligation of his oath; and so he was, according to the letter of it, but not according to the spirit. In the matter of a promise one must always consider the meaning and not the mere words.
Our forefathers have given us another striking example of justice toward an enemy: when a deserter from Pyrrhus promised the Senate to administer poison to the king and thus work his death, the Senate and Gaius Fabricius delivered the deserter up to Pyrrhus. Thus they stamped with their disapproval the treacherous murder even of an enemy who was at once powerful, unprovoked, aggressive, and successful.
 With this I will close my discussion of the duties connected with war.
Pirates, the “common foe of all the world,” are not “lawful enemies.”
In 3.29.107, Cicero makes these remarks:
 Furthermore, we have laws regulating warfare, and fidelity to an oath must often be observed in dealings with an enemy: for an oath sworn with the clear understanding in one’s own mind that it should be performed must be kept; but if there is no such understanding, it does not count as perjury if one does not perform the vow. For example, suppose that one does not deliver the amount agreed upon with pirates as the price of one’s life, that would be accounted no deception—not even if one should fail to deliver the ransom after having sworn to do so; for a pirate is not included in the number of lawful enemies, but is the common foe of all the world (communis hostis omnium); and with him there ought not to be any pledged word nor any oath mutually binding.
Source: Cicero, De officiis. (Walter Miller, transl.; Loeb Classical Edition; Latin/English parallel text). Harvard University Press, 1913.
- Harrer, G. A. Cicero on Peace and War. Classical Journal, 14(1), 1918, pp. 2638.