The 62-year-old San Francisco attorney probes prosecutors' cases for legal weaknesses - the evidence that violates hearsay rules or the latest court precedent, the proposed jury instructions that tilt the scales toward guilt - in hopes of getting charges narrowed or dismissed. While other lawyers question witnesses and argue to the jury, Riordan tees up the issues that often decide the outcome in higher courts.

He has scored one significant victory in Bonds' case, winning rulings barring evidence of positive steroid tests because the trainer who arranged them, Greg Anderson, has refused to testify about whether the samples came from the all-time home-run king. Riordan lost a ruling when a judge agreed to let former ballplayers testify that Bonds referred them to Anderson, who gave them steroids, but the defense is challenging other witnesses and evidence in hopes of whittling down the prosecution's case before the trial starts March 21.

Panthers and pot

Riordan's 35-year legal career includes a successful 14-year effort to win the release of Johnny Spain, a former Black Panther convicted of conspiring to murder San Quentin prison guards in a 1971 escape attempt led by George Jackson. The attorney also won rulings overturning the nation's first murder conviction based on a witness' "recovered memory," and reversing the federal marijuana convictions of noted pot advocate Ed Rosenthal.

Riordan also led the defense team in Arkansas that achieved a stunning victory in November when that state's Supreme Court ordered new hearings for the West Memphis Three, youths convicted of murdering three 8-year-old boys in 1993, after their lawyers uncovered DNA evidence that showed no trace of the defendants at the crime scene. Riordan's client remains on death row.

For defendants, The Chronicle declared in a 2003 catalog of the Bay Area's top 10 lawyers, Riordan represents "the last hope."

Losing is common

But Riordan is quick to say that failure is the norm for criminal appellate attorneys, himself included.

"No matter how hard you work or how well you work, it's a fact of life that you're going to be unsuccessful most of the time ... 90 to 96 percent of the time," Riordan said in an interview. Courts that review convictions have to start with a presumption that the verdict was correct, he said, "or the system would collapse."

That's how it played out for Marjorie Knoller, the San Francisco attorney convicted of murder for a fatal dog mauling in her apartment building corridor 10 years ago this week. Riordan initially persuaded the trial judge to reduce Knoller's conviction to manslaughter, based on her testimony that she didn't know the dog was capable of killing. But the state Supreme Court ordered further hearings, a new judge reinstated the murder conviction, and Knoller is back in prison.

Others whose convictions Riordan has appealed unsuccessfully include Jose Garcia, a Pelican Bay state prison guard convicted of setting up the beatings of inmates, and porn theater owner Jim Mitchell, convicted of manslaughter for fatally stabbing Artie Mitchell, his brother and business partner.

Brutal honesty

Riordan said he tries to be "brutally honest" with clients and their families when discussing their chances. But personally, he said, "winning is never as good as losing is bad."

It can play havoc with your self-esteem, said one of Riordan's former adversaries.

"When I was a prosecutor and I won all the time, I assumed I was a really good lawyer. Then I became a defense lawyer and started to lose all the time," said Martha Boersch, a former assistant U.S. attorney in San Francisco.

Boersch prosecuted Pavel Lazarenko, a former Ukrainian prime minister convicted in San Francisco in 2004 of laundering more than $20 million through U.S. banks. Riordan and his colleagues were able to whittle down the charges and win reversal of nearly half of Lazarenko's convictions, but he still wound up with an eight-year prison sentence.

Riordan, Boersch said, is "a formidable opponent."

Father's footsteps

A native of the Bronx, Riordan said he was groomed for a legal career like his father, who died when Riordan was young. He was also shaped by the leftist campus politics of the late 1960s and early 1970s, opposed the Vietnam War and protested the killings of four students during a 1970 anti-war demonstration at Kent State University in Ohio.

As a law student at New York University, Riordan worked on the cases of inmates at Attica State Prison charged in a bloody 1971 uprising. He "felt very justified," he recalled, when autopsies showed that guards whose throats were supposedly slit by inmates had actually been killed by their fellow officers' gunfire.

Riordan graduated with honors, clerked for a federal judge in Wisconsin and then headed West along with friends and mentors like defense lawyer James Larson, now a U.S. magistrate in San Francisco. Larson was a colleague at Riordan's first trial, which ended in the acquittal of a political radical charged with fomenting a riot in Texas.

Riordan spent a year representing the United Farm Workers in Salinas, then joined the newly formed state public defender's office in San Francisco, where he found himself drawn to appellate law.

It was a field that proved to have practical as well as intellectual appeal, he said: As the father, later divorced, of a young daughter, he could write his briefs at 2 a.m. and be free to catch all her after-school volleyball games.

San Quentin Six

Among the cases Riordan brought to the defender's office, and later to his private law practice, was the appeal of Spain, one of the San Quentin Six convicted of conspiring to murder prison guards slain in the breakout attempt by Jackson, the militant leader who was also killed.

The case meandered through the courts. An appeals court overturned Spain's conviction but the U.S. Supreme Court reinstated it. Finally a federal judge in San Francisco set the conviction aside because Spain had been forced to wear 25 pounds of shackles in the jury's presence during the trial.

Another long-running case ended successfully in 1995 when a federal judge overturned the murder conviction of George Franklin of San Mateo, whose guilt for a 1969 child-killing rested on his daughter's testimony that she had suddenly remembered the events during therapy 20 years later.

After Franklin had spent more than six years in prison, Riordan and his colleagues convinced the courts that the daughter could have learned the details of the case from news accounts, and that she had discredited herself by accusing her father of another killing he could not have committed.

Cases like Spain's and Franklin's, and that of the West Memphis Three, fit nicely into the fight-the-power ideology of Riordan's youth. But as a lawyer responsible for the finances of a firm he started in the early 1980s, and now runs with partner Donald Horgan, Riordan takes a nonpartisan view of his mission.

"As one gets older and wiser," he said, "the constant is that you see people all the time who need help protecting themselves against the power of the state. I don't see it as part of a specific political movement."

Working the other side

The veteran of Attica and the Spain case has also represented two prison guards - Garcia, whose convictions were upheld, and David Lewis, ultimately cleared of wrongdoing for wounding an inmate at Pelican Bay. Current clients include an East Coast lawyer charged with setting up illegal tax shelters, a case that Riordan described as a test of the scope of the federal conspiracy law.

He also represented E. Robert Wallach, a San Francisco attorney convicted of taking payments from a New York contractor to influence his friend Edwin Meese, the attorney general under President Ronald Reagan. The appeal that overturned Wallach's convictions in 1991 was argued by Riordan and his ideological opposite, Robert Bork, Reagan's onetime Supreme Court nominee.

Their first meeting was anxiously awaited, said Cristina Arguedas, a Bay Area defense lawyer who was also involved in the case and is now one of Bonds' attorneys.

"In the first five minutes in the taxicab," she recalled, "the two brilliant brains, Dennis Riordan and Robert Bork, had made friends because they had the same wry sense of humor and were two intellectual equals."

The night before the argument, Riordan said, Bork, a Justice Department veteran, told him it was his first criminal appeal on the defense side - the first time he'd represented a client who would go to prison if he lost.

It's a demanding but essential occupation, Riordan said.

Like an emergency-room doctor, he said, "you're often in situations where the odds are heavily stacked against you and the consequences are dire. But prevailing can really change somebody's life and give them a new life."