Mayor Bill de Blasio tried Monday to quell a backlash over the NYPD’s response to an uptick in rape cases in the city.

De Blasio agreed with critics who said the NYPD waited too long to alert the public after what police said was a gang rape of an 18-year-old girl in Brooklyn’s Brownsville neighborhood on Thursday.

De Blasio first learned of the assault on Sunday, said mayoral spokesman Peter Kadushin.

StoryNYPD: 4 teens in custody for rape of NY woman StoryNYPD: 5 men raped woman in parkphotosRecent NYC mug shots

“The mayor now believes strongly that the local community should have been informed sooner and has instructed that the NYPD notify communities more quickly moving forward, whenever appropriate,” Kadushin said in a statement Monday night.

Earlier, the mayor stood by a suggestion by Police Commissioner William Bratton that women should use the “buddy system” to protect themselves from sexual assault.

“I think it falls under the broad rubric — and I believe this is what the police commissioner was saying — of people being vigilant, being careful in what they do,” de Blasio said during a news conference at an unrelated event. “But again, I don’t want there to be any mistake, we are responsible of the safety of the women in this city.”

advertisement | advertise on newsday

Last week, before the Brownsville incident, Bratton said on WNYC that intoxicated women leaving bars and getting into taxis should not travel alone. The city recorded a 5.3 increase in reported rapes in 2015.

Bratton’s comments drew condemnation as “sexist, antiquated and an insult to women” from City Councilwoman Laurie Cumbo (D-Brooklyn). Other elected officials also said women have a right to feel safe, and the National Organization for Women’s New York City chapter called on the NYPD to “take rape seriously.”

NYPD spokesman J. Peter Donald said Monday in a statement that the department believes that rape is “never the victim’s fault, but you should know what you can do to minimize your vulnerability.”

Get the Newsday Now newsletter!

The best of Newsday every day in your inbox.

The Democratic mayor said at the news conference he felt “anger and disgust” at the Brownsville incident. He said police were “very aggressive” in apprehending suspects and there was “no delay” in their response to the scene.

But amid criticism that it took too long for police to notify the public of the alleged rape and that the assailants were on the loose, de Blasio appeared less sure and said he would “look into what constituted that specific timeline.”

NYPD officials didn’t alert the media about the Thursday night Brownsville assault until Saturday night and de Blasio didn’t issue a statement until late Sunday afternoon.

Brooklyn Borough President Eric Adams said Sunday, “The members of this community should be notified immediately when you have such a savage assault.”