Judge Charles W. Halleck in the early 1990s in northern California, where he retired after a tumultuous 12 years as a D.C. Superior Court judge. (Heidi Halleck)

Charles W. Halleck, an outspoken crew-cut conservative who transformed into a bearded, bell-bottom-wearing progressive during a 12-year stint as a D.C. Superior Court judge, stoking the anger of prosecutors and police officers while championing marginalized groups such as gays, prostitutes and marijuana users, died Oct. 31 at a nursing home in Portola Valley, Calif. He was 88.

The cause was not yet known, said a daughter, Heidi Halleck.

A son and namesake of a former Republican majority leader in the U.S. House, Judge Halleck was appointed in 1965 to what became the D.C. Superior Court. He presided over trial cases that decided everything from simple traffic matters to the fate of protesters arrested for demonstrating at the White House.

He established himself as a fiery presence on the bench, known as much for keeping a revolver in his desk drawer as for his tough sentencing and conservative political views, seen by some journalists as echoes of his father, Rep. Charles A. Halleck of Indiana.

Describing himself as “society’s representative to do vengeance,” Judge Halleck seemed to take a special interest in convicting antiwar protesters and long-haired hippies, once telling two men charged with marijuana possession, “If you come in here looking like a bunch of kooks and dressed up in crazy clothes and beads, you’re going to be found guilty before they call the case.” He reportedly refused to release them on bond until they agreed to cut their hair.

According to his daughter, his views began to shift with the emergence of the civil rights movement and because of a relationship with reform-minded criminologist Jeanne Wahl, whom he married in 1970. With her encouragement, he began meeting with progressive legal activists in the District and — in place of the suburban polo grounds that he once frequented with his father — started visiting the offices of Pride Inc., an employment program for black teenagers led by future D.C. Mayor Marion Barry.

Crucially, he also began meeting with prisoners at Lorton Reformatory, the Virginia prison where the District sent many of its inmates. At one point, he spent a weekend living in the facility, assessing its conditions and speaking with some of the criminals he had convicted. Prisons, he decided, were simply “finishing schools for crime.”

Growing out his hair and swapping slacks for denim under his robe, Judge Halleck began advocating for expanded mental health facilities and better treatment for female convicts, while railing against former conservative allies who called for “more police and more courts” to address crime in the District.

He dismissed charges against gay men targeted under an indecency act, deeming the law unconstitutionally vague; testified against marijuana possession laws he said were disproportionately applied against black men; and wept and laughed in the courtroom during trials that acquitted protesters such as Dick Gregory, who had been arrested at the White House in 1973 for protesting the U.S. bombing of Cambodia.

Judge Halleck said prostitutes were being unfairly prosecuted, dragged into court while their male customers were left behind, and according to his daughter, he found excuses to avoid bringing their cases to trial.

“He was an activist on the bench,” said Heidi Halleck, who practices family law in Bowie, Md. “The court system used to have just a few public defenders and didn’t have the resources to defend people appropriately . . . He would ask the questions that the defense wouldn’t ask.”

Judge Halleck’s style sometimes crossed the bounds of what colleagues and lawyers considered acceptable behavior.

According to a 1975 Washington Post story, a judicial review panel aiming to determine whether Judge Halleck’s term on the court should be extended found more than 40 cases in which his behavior was criticized, including cases of verbal abuse.

He reportedly told a U.S. marshal to “shove it,” excoriated a defense attorney by saying he had “no more idea than a pig has about Sunday . . . about what he is doing on this motion” and threatened to jail police officers for tardiness in the courtroom. One day later, The Post reported in 1970, he did jail someone — a court clerk who failed to find a lost file.

Judge Halleck said he was simply trying to restructure a system plagued by ineffective public defenders and a seemingly endless backlog of cases, but his two-year fight over a second term as judge ended in failure. In May 1977, President Jimmy Carter announced he would not nominate Mr. Halleck for the term.

“You start leaning, you start pushing, you start crowding and you run the risk of getting called intemperate,” an unbowed Judge Halleck said after the decision.

“You ask anybody, I was a damn good judge.”

Charles White Halleck was born in Rensselaer, Ind., on July 6, 1929. Born into a family of lawyers — including his grandfather, grandmother and father — he later said he “didn’t have much choice” in his profession and would have preferred to work as an architect.

He grew up in Washington, graduated from St. Albans preparatory school and studied economics at Williams College, receiving a bachelor’s degree in 1951.

His first marriage, to Carolyn Wood, ended in divorce. In addition to his wife of 47 years, survivors include seven children from his first marriage, Holly Patton of Poolesville, Md., Charles Halleck Jr. of Washington, Todd Halleck of Woodbridge, Conn., Heather Halleck of Hartly, Del., Heidi Halleck of Annapolis, William Halleck of San Jose and Hope Halleck of Churchton, Md; six grandchildren; and four great-grandchildren.

Judge Halleck served in the Navy before attending George Washington University law school and, after graduating in 1957, worked as an assistant U.S. attorney and then an associate at the law firm of Hogan & Hartson.

His father’s role in shepherding civil rights legislation through the House probably contributed to President Lyndon B. Johnson’s decision to nominate Judge Halleck for a judgeship in what was then the Court of General Sessions.

Judge Halleck entered private practice in 1977 before retiring to Los Altos Hills, Calif., “sick” of legal work. He took up photography instead, working as a freelance photojournalist for the San Jose Mercury News and appearing at exhibitions in local galleries, freed of the constraints he said he bristled against as a judge.

"I got a little impatient," he told The Post after leaving the bench, "but I wouldn't change a bit."