“Both in war and in courts and everywhere else, one must obey the commands of one’s city and country, or persuade it as to the nature of justice,” Socrates tells his friend Crito, in a dialogue written by Plato, another of his friends and pupils. The law, Socrates argues, provides two alternatives: Citizens can either use persuasion to change it, or they must do as it says.

Agreeing with laws only when they suit us is not an option. By choosing to live in Athens and to raise children there, Socrates had shown in both words and deeds that he agreed to live in accordance with its laws. Violating them now would be a rejection of all that he had said and done throughout his life. Clinging to life, in other words, would make living worthless.

Unable to best Socrates’ arguments, his friends are obliged to agree with him. All they can do is be with him in the hours before he is given the poison that will kill him. Socrates uses the time to discuss how one should live, because, as he said at his trial, “the unexamined life is not worth living.”

At the time of Socrates’ trial, Athens was a dangerous place for principled citizens. Just five years earlier, the city lost an almost three-decade war with its great rival, Sparta, and a harsh oligarchy had been imposed. During their reign of terror, the oligarchs ordered Socrates and four others to arrest a fellow citizen so that he might be executed. The philosopher refused, and escaped death only because the oligarchy collapsed when exiled democrats rebelled.

The democracy that followed was unsettled, vindictive and suspicious of new ideas. Socrates had been a figure for debate for decades. In 423 B.C., in “The Clouds,” the comic playwright Aristophanes lampooned him as making wrong appear right — inspiring the later charges that cost him his life. Furthermore, Socrates had also once taught a younger man, Critias, who became one of the oligarchy’s leaders, and some saw this as a reason to prosecute him. Socrates’ trial and execution would prove an indelible blot on democracy’s legacy, but other leading intellectuals, too, were prosecuted, including the natural philosopher Anaxagoras, who left the city after being accused of “impiety.”

Directing his most probing and provocative questions against the pompous and self-righteous, sharing his thoughts with rich and poor, Socrates was the quintessential anti-populist. This was bound to gain him enemies from all quarters. He knew the risks. But having seen no reason to bow to the oligarchs, he would not compromise with the many, either.

“No man will survive who genuinely opposes you or any other crowd and prevents the occurrence of many unjust and illegal happenings in the city,” he told his prosecutors and jury. “It is not difficult to avoid death, gentlemen; it is much more difficult to avoid wickedness, for it runs much faster than death.”