DETROIT (AP) — Judge Damon J. Keith, a grandson of slaves and figure in the civil rights movement who as a federal judge was sued by President Richard Nixon over a ruling against warrantless wiretaps, died Sunday. He was 96.

Keith died in Detroit, the city where the prominent lawyer was appointed in 1967 to the U.S. District Court, according to the Swanson Funeral Home.

Keith served more than 50 years in the federal courts, and before his death still heard cases about four times a year at the 6th U.S. Circuit Court of Appeals in Cincinnati.

A revered figure in Detroit for years, Keith captured the nation’s attention with the wiretapping case against Nixon and Attorney General John Mitchell in 1971. Keith said they couldn’t engage in the warrantless wiretapping of three people suspected of conspiring to destroy government property. The decision was affirmed by the appellate court, and the Nixon administration appealed and sued Keith personally. The case went all the way to the Supreme Court, where the judge prevailed in what became known as “the Keith case.”

Keith revisited the civil liberties theme roughly 30 years later in an opinion that said President George W. Bush couldn’t conduct secret deportation hearings of terrorism suspects. Keith’s opinion contained the line, “Democracies die behind closed doors.” A similar phrase — “Democracy dies in darkness” — is now the slogan of The Washington Post, which has credited Keith.

“During his more than 50 years on the federal bench, he handed down rulings that have safeguarded some of our most important and cherished civil liberties, stopping illegal government wiretaps and secret deportation hearings, as well as ending racial segregation in Pontiac (Michigan) schools,” Detroit Mayor Mike Duggan said in a statement.

Praveen Madhiraju, Keith’s former law clerk, worked with him on the 2002 opinion against Bush. Keith had credited Madhiraju with coining the “Democracies die behind closed doors,” line, but the attorney now based in Washington, D.C., said Keith deserves far more credit.

“I came up with the words, but Judge Keith was clearly the inspiration behind the whole thing,” Madhiraju told The Associated Press in December 2017. “There’s no way if I’d worked any other judge in the country I would have thought of that phrase.”

Madhiraju said it helped that Keith would periodically pop in the clerk’s office to offer suggestions, such as instructing him to review the Pentagon Papers on U.S. policy toward Vietnam and the words of the late Sen. J. William Fulbright, who said, “In a democracy, dissent is an act of faith.”

Keith told the AP in an October 2017 interview that the phrase, “Equal justice under law,” etched onto the U.S. Supreme Court building in Washington, inspired him and always summoned the lessons Thurgood Marshall taught him as one of his professors at Howard University. Marshall became the first black Supreme Court justice in October 1967 — the same month Keith received his federal appointment.

He recalled Marshall saying, “The white men wrote those four words. When you leave Howard, I want you to go out and practice law and see what you can do to enforce those four words.”

Keith did just that. In 1970, he ordered a bus policy and new boundaries in the Pontiac, Michigan, school district to break up racial segregation. A year later, he made another groundbreaking decision, finding that Hamtramck, Michigan, illegally destroyed black neighborhoods in the name of urban renewal with the federal government’s help. The remedy was 200 housing units for blacks. The court case is still alive decades later due to disputes over property taxes and the slow pace of construction.