NEW YORK (AP) — A federal judge in New York City who was nominated by President Lyndon Johnson and who contributed to the landmark case that struck down racial segregation in public schools is retiring at age 98.

U.S. District Judge Jack Weinstein was known for favoring lenient sentences and rehabilitation.

He retired this week after moving his remaining cases to his fellow jurists in the federal court based in Brooklyn, The New York Daily News reported Wednesday.

He was the longest-serving incumbent federal judge, the newspaper reported.

He spent nearly 53 years on the bench.

Weinstein, who was appointed in 1967, was the last federal judge named by Johnson. Weinstein said he often pushed for the shortest prison sentences possible so people could try to build a better life.

“We need to rule from a place of love, not hate,” he told the Daily News.

Weinstein moved to Brooklyn with his family when he was 5. He enlisted in the Navy after the bombing of Pearl Harbor and served on a submarine where he helped sink a Japanese cruiser.

He graduated from Brooklyn College and enrolled at Columbia Law School after World War II.

He contributed research and briefs to aid future Supreme Court Justice Thurgood Marshall’s argument in the landmark Brown v. Topeka Board of Education ruling.

In his retirement, Weinstein said he plans to spend more time with his wife, Susan Berk, and work with one of his three sons on a book about Jim Crow laws.