The official, James Cosgrove, who has led the police force in Elizabeth since 1998, has declined to comment on the findings of an investigation by the Union County prosecutor’s office that began after a lawyer for several police officers filed complaints.

The state’s attorney general, Gurbir S. Grewal, has stepped in and demanded that Cosgrove resign.

Grewal pointed to the prosecutor’s findings, which have not been released, but “concluded that, over the course of many years, Director Cosgrove described his staff using derogatory terms, including racist and misogynistic slurs.” Grewal also ordered an examination of the culture of the Elizabeth Police Department.

Cosgrove, 73, is a political appointee who can be removed only by the mayor, J. Christian Bollwage, who also has refused to discuss the findings of the two-month investigation.

The mayor’s only public comment came Monday on Twitter when he attacked a news report, which he called a “character assassination.” Bollwage is scheduled to meet Tuesday with the attorney general, whose office is now overseeing the investigation, a spokesman said.

Over the years, Elizabeth has transformed from a largely white working-class city into an overwhelmingly minority community, where more than 80% of its roughly 130,000 residents are Hispanic or black.

The controversy involving Cosgrove is the latest chapter in what community groups and residents say are long-running tensions between the police and people of color that reflect similar conflicts across the country.

“It’s critical that the city government take action to ensure that the Police Department reflects the value of our city,” said Sarah Cullinane, the director of Make the Road New Jersey, an Elizabeth-based organization that helps immigrant and minority communities and has called for Cosgrove’s resignation.

“One of the core responsibilities of an effective law enforcement leader is to maintain the trust of the community he or she serves,’’ Grewal said in a statement Friday. “Director Cosgrove has violated that trust and, in doing so, undermined confidence in our system of justice.’’

The investigation into Cosgrove was spurred by Joshua F. McMahon, a lawyer who represents several Elizabeth police officers and who brought complaints about the director to the Union County prosecutor’s office in February. The investigation and its findings were first reported by The Star-Ledger.

The prosecutor’s office referred questions about its investigation to the attorney general’s office, which declined to discuss any details, including whether Cosgrove was interviewed as part of the inquiry and the circumstances in which he used slurs.

Cosgrove is not a uniformed police employee and is not subject to discipline by the state attorney general. He instead answers to Bollwage, who appointed Cosgrove two decades ago.

The mayor’s silence since the controversy erupted has angered activists and residents.

“For the mayor of Elizabeth to dig in and not take any action, or even acknowledge that these calls have been made, is completely irresponsible and undermines the interests of the community in Elizabeth and all across New Jersey,” said Amol Sinha, executive director of New Jersey’s chapter of the American Civil Liberties Union.

Community groups in Elizabeth said the city’s immigrant and minority communities have regularly wrestled with concerns over police conduct, including its use of force and its support for federal immigration directives.

Cosgrove, who is retired from the Newark Police Department, is considered a political ally of Bollwage, a Democrat who was re-elected to a seventh term in 2016.

In a letter to the county prosecutor’s office, McMahon indicated that the racist and sexist slurs were not the only issues involving Cosgrove.

“It is my understanding that, in the course of your investigation, it was reported that Cosgrove engaged in various other forms of serious misconduct, including acts of sexual harassment, as well as routinely interfering in internal affairs investigations,” McMahon wrote.

Charles Wilson, chairman of the National Association of Black Law Enforcement Officers, which has several members on the Elizabeth police force, said he fears that whatever happens to Cosgrove, the controversy will further damage the relationship between the city and the police.

“Regardless of which way it goes, it will no less create a problematic situation,” Wilson said. “Not just for the officers serving in that department, but for the community that they’re sworn to serve.”

This article originally appeared in The New York Times.