All societies are unjust to some degree. In law-governed societies, that injustice will often be implemented by legislation. For a lawyer to take office as a judge in any society is to accept that he will at times have to be complicit in the implementation of laws he considers unjust.

Open gallery view Richard Goldstone during a session of the Human Rights Council in Geneva, Switzerland, Sept. 29, 2009. Credit: AP

But judges like to think that they will be able to render justice in their decisions even when the law is flawed, and often their oaths of office make this their duty. Thus apartheid-era judges, like judges in many other jurisdictions, swore to "administer justice ... in accordance with the law."

Given the grave injustice of apartheid, it is possible that it was both naive and morally wrong to be an apartheid-era judge. And Richard Goldstone, who was appointed to the bench in South Africa in 1980, and who thus sat as an apartheid-era judge for some 14 years, is currently accused of having been deeply complicit in injustice.

Some charge that Goldstone did not take the opportunities his role as judge afforded him, either to do justice or to comment on the injustice of racist laws. He has already been ably defended against that charge by former chief justice Arthur Chaskalson, South Africa's greatest practitioner of human rights law during apartheid.

I will focus on the other accusation: Even if Goldstone did his best, his critics suppose that the good he could do was far outweighed by the injustice in which he participated.

This charge was hotly debated in South Africa, notably after 1983, when a law professor argued that the few liberal judges on the bench should resign because their legal duty required them to decide their cases in accordance with the immoral doctrines of apartheid. His argument was implicitly rejected by those same liberal judges, who remained in office, and almost all legal academics dedicated to human rights dismissed it as well.

The academics rejected the argument both because they thought it underestimated the opportunity to do justice according to law and because it made a moral mistake. One distinguished scholar pointed out that, "If we ... argue that moral judges should resign, we can no longer pray, when we go into court as defense counsel, or even as the accused, that we find a moral judge on the bench." If we think it important that even in a very unjust society lawyers should try to vindicate the rights of the victims of injustice in the courts, we must hope that judges who might respond positively to their claims see a moral reason to stay in office.

Indeed, even the victims of apartheid and their lawyers who chose to participate in the legal process implicitly rejected the argument for mass resignation, as was made clear by the small number of defendants who refused legal representation or even to represent themselves on the grounds that they refused make themselves complicit in systemic injustice.

So even at the worst of times, lawyers like Chaskalson and those they represented thought it worthwhile to fight for justice according to law. And while it is indeed clear that the liberal judges took a far riskier moral course than those who refused judicial appointment, perhaps they should be admired for putting themselves out there. They made themselves complicit in injustice, but without that complicity there would have been no justice whatsoever.

At the hearing into the role of judges and lawyers during apartheid held by South Africa's Truth and Reconciliation Commission, I argued that judges like Goldstone were justified in remaining in office because they kept alive the idea that the rule of law is a virtue in any society. Indeed, their example is acknowledged to have been important in the decision of the African National Congress during the constitutional negotiations in 1993 not to insist, as is the case in most post-colonial African countries, on absolute legislative power for the central government, but rather to agree to a constitution that guarantees rights and freedoms and gives judges the final authority to interpret the constitution.

It was also considered fitting that both Chaskalson and Goldstone should serve on the first bench of South Africa's Constitutional Court, the body established as the final court of appeal on constitutional matters, and which was designed to oversee the legal transformation of South Africa.

We must therefore ask why suddenly there is a chorus of uninformed opinion that wishes to second-guess the judgment of South Africans, including Nelson Mandela, who appointed the first bench of judges to the Constitutional Court. We should also ask why the same chorus is claiming spuriously to have exposed a history that has been openly debated for almost 30 years.

David Dyzenhaus, a professor of law and philosophy at the University of Toronto, is author of "Judging the Judges, Judging Ourselves: Truth, Reconciliation, and the Apartheid Legal Order."