This is the advice Machiavelli writes for the Medici when the forced retirement of exile gives him time to write a new Handbook of Princes for a new kind of prince: the princes of Florence, whose duty is to protect Florence–beautiful, unique, burgeoning, irreplaceable Florence–and her citizens–artists, philosophers, poets, statesmen, craftsmen–from the perils of conquest and extermination which constantly threaten her fragile walls. With France so close, one more civil war could be the end. This is not a question of selfishness or power for power’s sake, but of the very survival of the nation in their care. “In order to be virtuous, the people must still be alive,” (paraphrase). In this situation, he writes, we should study and emulate Julius Caesar, but we should also study and emulate Cesare and Julius II. If fear will discourage conspiracy, use fear. If the betrayal and exile of one dangerous faction or family will stabilize the republic, use betrayal. If breaking a treaty will give Florence the ally she needs to survive, rip up that scrap of paper. It is the prince’s duty.
This is not a good consequence erasing an evil act, it is the argument that the act itself is not evil because of its good consequence. Saving a hundred thousand lives, or Florence, is good–the means, therefore, are good, even if the means are a murder.