Perhaps others had been deluded about the distinction because the same word in Italian — “amici” — is used for both concepts. Whoever imagines allies are friends, Machiavelli warns, ensures his ruin rather than his preservation.

There may be no students more in need of this insight, yet less likely to accept it, than contemporary Americans, both in and outside the government. Like the political moralizers Machiavelli aims to subvert, we still believe a leader should be virtuous: generous and merciful, honest and faithful.

Yet Machiavelli teaches that in a world where so many are not good, you must learn to be able to not be good. The virtues taught in our secular and religious schools are incompatible with the virtues one must practice to safeguard those same institutions. The power of the lion and the cleverness of the fox: These are the qualities a leader must harness to preserve the republic.

For such a leader, allies are friends when it is in their interest to be. (We can, with difficulty, accept this lesson when embodied by a Charles de Gaulle; we have even greater difficulty when it is taught by, say, Hamid Karzai.) What’s more, Machiavelli says, leaders must at times inspire fear not only in their foes but even in their allies — and even in their own ministers.

What would Machiavelli have thought when President Obama apologized for the fiasco of his health care rollout? Far from earning respect, he would say, all he received was contempt. As one of Machiavelli’s favorite exemplars, Cesare Borgia, grasped, heads must sometimes roll. (Though in Borgia’s case, he meant it quite literally, though he preferred slicing bodies in half and leaving them in a public square.)

Machiavelli has long been called a teacher of evil. But the author of “The Prince” never urged evil for evil’s sake. The proper aim of a leader is to maintain his state (and, not incidentally, his job). Politics is an arena where following virtue often leads to the ruin of a state, whereas pursuing what appears to be vice results in security and well-being. In short, there are never easy choices, and prudence consists of knowing how to recognize the qualities of the hard decisions you face and choosing the less bad as what is the most good.

Those of us who see the world, if not in Manichaean, at least in Hollywoodian terms, will recoil at such claims. Perhaps we are right to do so, but we would be wrong to dismiss them out of hand. If Machiavelli’s teaching concerning friends and allies in politics is deeply disconcerting, it is because it goes to the bone of our religious convictions and moral conventions. This explains why he remains as reviled, but also as revered, today as he was in his own age.