Shame on Leticia Perez for upholding one of the basic tenets of American jurisprudence, a pillar of our democracy straight out of the Bill of Rights.

In early 2011, while she worked in the Kern County Public Defender's office, Perez defended a creep. She argued on behalf of Robert Gonzales, a verifiable dirtbag who abused a small dog and did so with unusual cruelty. He was eventually sentenced to counseling and three months' probation.

Now, suddenly, Perez's audacity is political fodder. The California Association of Realtors, which supports Andy Vidak, Perez's opponent in this month's special election runoff for the state senate's vacant 16th District seat, has mailed out fliers advising voters of Perez's past transgression. Perez is undeserving of your vote, we are in essence told, because she helped uphold someone's Sixth Amendment right to "the assistance of counsel for his defense," in the words of that vital document.

The fact that Gonzales, then 43, was accused of taping a dog's mouth shut, spraying its eyes with bleach and beating it with a golf club -- disgusting as all that might be -- is immaterial. The Constitution says somebody has to defend him, and if he can't afford his own attorney, we taxpayers must fund his defense, usually by way of the Public Defender's office.

However, the specifics of the Gonzales case are not immaterial to the California Association of Realtors.The trade association is supporting Vidak to the tune of at least $500,000 in hopes that he, as a rookie state senator, will support its opposition to a Democratic priority bill on real estate transfer taxes.

There is no shortage of legitimate issues that Republicans might cite in their opposition to Perez, but things have a tendency to get ugly two weeks before the election, and so the California Association of Realtors is right on schedule.

Did Perez represent Gonzales with enthusiastic glee? Immaterial. According to Canon 7 of the American Bar Association's Model Code of Professional Responsibility, "the duty of a lawyer, both to his client and to the legal system, is to represent his client zealously within the bounds of the law." This code of ethics extends to all clients regardless of a lawyer's belief that they will justly be found either guilty or innocent. And as for the Public Defender's staff attorneys, they are often assigned to cases. They do not necessarily pick and choose the clients they want to defend.

Surely Vidak's supporters at the California Association of Realtors grasped all this.

Perez has a special interest in her back pocket, too: Chevron Corp., which figures its best chance to defeat an oil severance tax is by endearing itself to the Legislature's Democratic supermajority. (Probably a wise strategy.) Chevron, no doubt encouraged by Perez's former boss, former 16th District Sen. Michael Rubio, who resigned to become a Chevron lobbyist, contributed $100,000.

Political campaigns are slimy enough thanks to these dubious alliances, but supporters should at least confine their arguments to defensible positions. Hopefully Chevron is not plotting something similarly disgusting against Vidak.

Meanwhile, the candidates themselves should steer as clear from this sort of nonsense as they can. It might be catching.