In 2007, Judge Batts rejected New York City’s motion to dismiss a lawsuit by the Central Park defendants. In 2014, the city settled, agreeing to pay the men almost $41 million.

In 2010, Judge Batts sentenced Mamdouh Mahmud Salim, a reputed former top adviser to Osama bin Laden, to life in prison after he pleaded guilty to stabbing a federal jail guard while he awaited trial on terrorism charges.

Judge Batts also oversaw a civil suit against former Gov. Christine Todd Whitman of New Jersey, who was accused of misleading the public when she was administrator of the Environmental Protection Agency about the risk of toxic air pollution after the Sept. 11, 2001, attack on the World Trade Center. Judge Batts found that Mrs. Whitman had made statements that were so misleading, they were “conscience-shocking.” An appeals court, however, dismissed the suit in 2008.

Judge Batts was set to preside over the embezzlement trial of Michael Avenatti, the lawyer who is accused of swindling $300,000 from his client, the pornographic film star Stormy Daniels, while he was representing her in her suit against President Trump. (Mr. Avenatti has pleaded not guilty.)

One of Judge Batts’s closest friends, Supreme Court Justice Sonia Sotomayor, recalled on Tuesday that they had both been recommended on the same day for judgeships in the Southern District.

“From that day forward, we became sisters,” Justice Sotomayor said in a statement to The New York Times. “Most importantly, she lived her life openly and earnestly, with fortitude and conviction.”

In May, during a recorded panel discussion held in Manhattan to commemorate Judge Batts’s 25 years on the bench, she appeared with three other openly gay federal judges. The three — Judge Oetken, Alison J. Nathan and Pamela K. Chen — said she had been an inspiration.