Two court cases last week, on either side of the Atlantic, helped illuminate the tensions in our thinking about justice. The first was the harrowing trial of Larry Nassar, the American doctor who, over decades, had abused dozens of gymnasts, mainly young girls, in his care. In the final week, 156 women gave personal statements, testimonies that were both distressing and inspiring.

In her summing-up, Judge Rosemarie Aquilina observed that “our constitution does not allow for cruel and unusual punishment”. If it did, she would have allowed “many people to do to him what he did to others”. She then sentenced Nassar to up to 175 years in prison.

The second trial was that of Darren Osborne, accused of mowing down Muslim worshippers in Finsbury Park, north London, in a van last year. One man was killed, many others seriously injured. Osborne, who denies charges of murder and attempted murder, allegedly tried to flee the scene, but was set upon by the crowd. Mohammed Mahmoud, an imam, intervened. “I shouted, ‘No one touch him,’” he told the jury at Woolwich crown court. Osborne “should answer for his crime in a court such as this and not in a court in the street”.

Where Aquilina would have imposed an “eye for an eye” punishment, if she could have, Mahmoud insisted that such retribution had no place in justice. There is no direct comparison between the two cases. They pose different moral questions and create different emotions. Had Aquilina been in Finsbury Park that night, she would probably have protected Osborne too. Nevertheless, expressed in Aquilina’s words and in Mahmoud’s actions are two very different conceptions of the relationship between justice and vengeance. For one, justice requires a measure of vengeance; for the other, the two are incompatible.

More than two millennia ago, the Greek playwright Aeschylus explored these very tensions in his magnificent Oresteia trilogy. Written in the fifth century BC, it remains one of the most profound studies of the meaning of justice.

Aeschylus’s Oresteia begins where Homer’s Iliad ends. The Iliad tells the story of the Trojan War, in which Greek warriors, led by Agamemnon, avenge the kidnapping of Helen by the Trojan prince Paris. In Oresteia, the war is over and the warriors are returning home. In the opening play of the trilogy, Agamemnon’s wife, Clytemnestra, brutally murders her husband on his homecoming. It is an act of furious revenge for his having sacrificed their daughter, Iphigenia, 10 years previously on the eve of the war to placate the gods.

In The Choephori, the second of the plays, Orestes, son of Agamemnon and Clytemnestra, is faced with a terrible dilemma: murder his mother or leave his father unavenged. He kills Clytemnestra. In the final play, The Eumenides, Orestes is pursued by the Furies, deities whose role is to exact vengeance for sins such as the shedding of kindred blood. He finds refuge in Athens where, in the Acropolis, the goddess Athena convenes a jury to try Orestes. The jury is split. Athena casts her vote in favour of acquittal.

The Oresteia is an immensely complex work in which Agamemnon, Clytemnestra and Orestes are all faced with impossible choices and make tragic decisions. The human condition, for Aeschylus, is tragic. But humans are able to live with the tragedy of their condition by civilising themselves. And part of the process of civilisation is the recognition of the distinction between vengeance and justice, between the primeval needs of the Furies and the hope planted by Athena.

In Aquilina’s words, we hear an echo of the Furies. In Mahmoud’s actions, we see the spirit of Athena.

One need feel no tinge of sympathy for Nassar, or be blind to the torment of his victims, to worry that Aquilina crossed a line. The desire for retribution is natural. Were I a father to one of the abused girls, I may well have wanted vengeance, but a judge cannot be swayed by the same emotions.

Vengeance as an ethical principle emerges from primitive attempts to impose order in a world in which it is constantly breaking down and can be maintained only through fear and retribution, a world such as that of Homer’s Iliad.

As society becomes more civilised, so it sublimates vengeance to justice. That is the moral core of The Oresteia.

Mohammed Mahmoud’s actions are important because they gave form to that distinction. Equally, Judge Rosemarie Aquilina’s words are troubling, not because we don’t have sympathy for Nassar’s victims, but because, in eroding the line between vengeance and justice, they also erode part of what it is to be civilised.