If the death penalty is ultimately abolished in America, future generations may wonder why it long remained the last Western democracy to execute prisoners. They may also ponder why Kamala Harris, California’s attorney general, chose to defend the state’s death penalty from a challenge in the federal courts as the abolition movement gained traction.

The case argued on Aug. 31 in the Ninth Circuit Court of Appeals, Jones vs. Davis, addresses a subset of constitutional issues, including the arbitrariness of California’s capital system and its lack of deterrent value. But the case raises broader questions about what Harris and Gov. Jerry Brown are accomplishing by defending what Justice Harry Blackmun famously called “the machinery of death.”

Serving justice is paramount

While attorneys general usually have a duty to enforce existing laws and defend them from constitutional challenges, their fundamental duty is to serve justice. Accordingly, they may choose not to defend laws that are unjust per se, raise grave constitutional problems or constitute terrible public policy. For instance, both Harris and Brown previously abandoned the state’s defense of Proposition 8, which prohibited same-sex marriage, from challenges in the federal courts. Similarly, certain prosecutors nationwide have announced that they will stop aggressively prosecuting petty drug offenses such as marijuana possession so they may focus on serious crimes.

By the same token, Harris and Brown could simply concede that California’s death penalty system is unconstitutional and stop defending it in the federal courts. For decades, capital punishment in California and nationwide has resulted in blatant and chronic due process violations, from racial discrimination to class discrimination, including against poor whites, and an inherent risk of executing innocent persons. Moreover, it is an affront to human dignity to execute incapacitated prisoners who could instead be imprisoned. These are among the reasons why all other Western democracies — European nations, Canada, Australia, New Zealand — consider the death penalty a fundamental human rights violation and misguided public policy. Two-thirds of all countries have abolished it in law or practice. Alongside the United States, the countries that lead the world in executions are all authoritarian, such as China, North Korea, Iran, Iraq and Saudi Arabia.

Few people realize that prosecutors have absolutely no obligation to pursue the death penalty. In Woodson vs. North Carolina, a 1976 case, the Supreme Court held that the death penalty cannot be a mandatory sentence. Although California and other states have technically adopted standards to determine which murderers deserve execution, compelling qualitative and quantitative evidence indicates that the death penalty is applied discriminatorily and arbitrarily. In addition, no credible evidence shows that the death penalty deters crime more than imprisonment. Certain commentators nonetheless contend that executions deter crime and raise no due process problems, yet their position evokes the pseudoscientific studies used to contest evidence of climate change or the theory of evolution.

As prosecutors have considerable discretion whether to seek the death penalty, some have wisely decided to focus on more humane and effective approaches to fighting crime. Litigating capital cases is notoriously far more expensive than resorting to life imprisonment. According to a 2011 study by Judge Arthur Alarcón and Paula Mitchell, California has spent more than $4 billion to fund its death penalty system since 1978. This budget could have been invested in public schools, crime prevention programs and prisoner rehabilitation, as well as hiring and adequately training police officers. Illustratively, numerous police chiefs deem that the death penalty should not be a priority and is a counterproductive policy. There is little doubt that certain public officials would not back the death penalty if they did not believe it to be a popular stance. It is therefore noteworthy that Harris is running for the U.S. Senate following the narrow defeat of Proposition 34, a 2012 initiative to abolish the death penalty. Another initiative aiming to bolster the capital system is in the works.

Not a matter of public opinion

More Californians probably would have embraced Prop. 34, which still garnered 48 percent of the “yes” vote, but for recurrent misinformation. As Justice Thurgood Marshall suggested, the relevant question is whether people would truly support the death penalty “in light of all information presently available.”

At any rate, the constitutionality of a practice should not depend primarily on whether it enjoys popular support. This principle is more readily acknowledged when we think of how the Constitution can protect racial and ethnic minorities, gays or women from discrimination supported by a majority of citizens. The same rationale should guide politicians and judges as they approach the rights of prisoners.

Ironically, Harris insists that she is personally against the death penalty, as former U.S. Attorney General Eric Holder claimed while continuing to seek it in federal cases. However, when a tension exists between a particular punishment and fundamental constitutional rights, the Constitution must emerge victorious regardless of public opinion. It is not too late for Harris to stand on the right side of history.

Mugambi Jouet, a legal and political scholar, is Thomas C. Grey Fellow at Stanford Law School. To comment, submit your letter to the editor at www.sfgate.com/submissions.