U.S. District Court Judge Roger W. Titus in 2009. (Mark Gail/The Washington Post)

Roger W. Titus, a retired judge of the U.S. District Court for Maryland and a former lawyer whose cases included the defense of then-Montgomery County Council member Isiah Leggett in a lurid sexual harassment lawsuit, died March 3 at a hospital in Washington. He was 77.

The cause was liposarcoma, a cancer of connective tissues, said a daughter, Paula T. Laboy.

As a lawyer, Mr. Titus handled high-stakes land-use litigation and, in 1991, won $15 million in damages for a Hyattsville developer in a breach-of-contract lawsuit involving a land sale.

But he was best known for his defense in 1992 of Leggett, who had been accused of turning a former aide into a virtual “sex slave” and subjecting her to years of degrading sex acts and drug abuse.

In his cross-examination of the accuser, Anne Renee Colbert, Mr. Titus highlighted contradictions between her testimony and her pretrial statements. He called as a witness Leggett’s longtime urologist, who testified that the chances of Leggett’s having conducted the strenuous acts he was accused of perpetrating were “almost nil.”

On the stand, Leggett said he rebuffed many advances by his former aide. Mr. Titus described Colbert as mentally ill, the orchestrator of a “gigantic hoax . . . a fantastic fraud or a fraudulent fantasy. . . . This woman needs treatment; she doesn’t need a lawsuit.”

After 19 days of testimony, the jury deliberated 90 minutes and returned a verdict exonerating Leggett. He went on to become chairman of Maryland’s Democratic Party and a three-term Montgomery County executive.

As a federal judge for Maryland’s Southern Division, Mr. Titus served at the Greenbelt Courthouse from 2003 until taking senior status in 2014, with a reduced workload.

Roger Warren Titus was born in Washington on Dec. 16, 1941, and grew up in Chevy Chase, Md. His father was a newspaper and department store advertising executive.

He graduated in 1959 from Bethesda-Chevy Chase High School, from Johns Hopkins University in 1963 and from Georgetown University Law School in 1966, attending classes at night while working days as an insurance claims adjuster.

He was the Rockville city attorney from 1970 to 1982. He also had a private law practice, Titus & Glasgow, which in 1988 merged with the Venable law firm. He became partner-in-charge of the firm’s Montgomery County office.

He was a former board chairman of Suburban Hospital in Bethesda and president of the Maryland State Bar Association.

Survivors include his wife of 57 years, Cathie Gaughen Titus of Bethesda; three children, Paula Titus Laboy and Mark W. Titus, both of Bethesda, and Richard R. Titus of Westminster, Md.; and four grandchildren.

In his years on the federal bench, Mr. Titus never liked sentencing, said John Vivian, who served last year as one of his law clerks. But the judge, he said, took pleasure in conducting a special courtroom procedure when an offender had completed a prison sentence.

As a rite of the offender’s re­entry to society, Mr. Titus came down from the bench, shook their hand and offered his best wishes, Vivian said.

There was one other part of his job that Titus particularly relished: presiding over naturalization ceremonies for new U.S. citizens.