The issue emerged for Mr. de Blasio last month after the Police Department’s decision to change a decades-old policy of posting certain disciplinary information on a clipboard in its public information office at Police Headquarters. The change, reported by The Daily News, coincided with the filing by the Legal Aid Society of a Freedom of Information Act request.

“For the past two years it’s become increasingly clear that the lack of accountability in police-involved deaths and other abuses is germane to the public interest,” Cynthia Conti-Cook, a staff attorney at Legal Aid, said.

Erica Garner, Mr. Garner’s daughter, put it more bluntly on Twitter on Thursday, accusing the mayor in particularly curt language of caring about black lives only in a sexual context.

The mayor insisted that the city had no choice but to defend the secrecy of the records until Albany acted to amend the law. As for the key outside advisers, Mr. de Blasio said, “when some individuals are very, very close advisers, that it is appropriate to have a private relationship with them.”

Officials at City Hall have maintained for months that emails and texts with a select group of outside advisers — including those whose firms have clients with business before the city — can and should be kept from public view if they contain advice for the mayor of the sort that his top city aides would provide. (For emails to City Hall related to advisers’ clients, officials have said those records would be turned over when requested.)

Mr. de Blasio’s position gained a kind of political infamy when in May his then-counsel, Maya Wiley, deemed the advisers “agents of the city.” Reporters have sought through Freedom of Information Act requests to pry open those records; NY1 and The New York Post began their court challenge this week.

Zachary W. Carter, the city’s corporation counsel, said the city was trying to put “a legal framework on something that has existed since the beginning of time.” He said that “the appropriate line drawing is a challenge, but it doesn’t mean that it isn’t worth the effort.”

Mr. Carter added that, besides the common theme of transparency, the approach to the emails was not at all related to the city’s position on police records. “It’s apples and — forget oranges — it’s apples and elephants in terms of a legal issue,” he said.