NEW YORK (AP) — Nearly 50 years after a police raid at the Stonewall Inn catalyzed the modern LGBT rights movement, New York's police commissioner apologized Tuesday for what his department did.

"The actions taken by the NYPD were wrong, plain and simple," Commissioner James O'Neill said during a briefing at police headquarters.

"The actions and the laws were discriminatory and oppressive," he added. "And for that, I apologize."

The apology comes just weeks ahead of the milestone anniversary of the raid and the rebellion it sparked the night of June 27-28, 1969, as patrons and others fought back against officers and a social order that kept gay life in the shadows.

The New York Police Department was facing calls to apologize from organizers of what is expected to be a massive LGBT Pride celebration in the city this year — and from organizers of an alternative Stonewall anniversary march. City Council Speaker Corey Johnson, who is gay, had also said the department should apologize.

He tweeted his appreciation for O'Neill's remarks, and Pride organizers cheered them.

"The NYPD, as an institution, needed to take responsibility for what happened at Stonewall. This isn't going to undo the decades of violence and discrimination that our community has experienced at the hands of the police, but it's a good first start," said James Fallarino, a spokesman for NYC Pride.

Police participate in and protect its annual parade, but the lack of a formal apology from the department for the 1969 raid — the very event that gay pride marches commemorate each June — has hung over the collaboration, Fallarino said. He hopes people will see O'Neill's remarks as a sign of "the NYPD's commitment to positive change."

Organizers of the alternative Queer Liberation March, however, see no such thing. They called O'Neill's comments an "empty apology" made under pressure.

"Where has this apology been for the last 50 years?" the group, called the Reclaim Pride Coalition, said in a statement. The coalition, which is excluding police from its march, is seeking a more sweeping apology from the NYPD. The group says transgender and minority LGBT people, among others, still face heavy-handed policing.

Story continues

At the time of the Stonewall raid, the psychiatric establishment saw homosexuality as a mental disorder, and law enforcement often viewed it as a crime.

LGBT people could be subject to arrest for showing affection, dancing together, even for not wearing a certain number of items deemed gender-appropriate. Bars that served gay people had at times lost their liquor licenses, and others — like the Stonewall — were simply unlicensed. Raids were common.

That night, patrons and passers-by erupted in resistance, shouting at officers, throwing coins, cans and anything at hand, and facing off with a tactical police unit brought in as reinforcements. There were about a dozen arrests and an unknown total number of injuries; police reported at least four officers were hurt. And the protests and clashes continued for several more nights.

It wasn't the first time gay people protested or spontaneously clashed with police. But it proved to be a turning point, unleashing a wave of organizing and activism. A park across from the Stonewall now houses first national monument to gay rights.

The head of the NYPD sergeants' union, Sgt. Ed Mullins, said that he understood why the department apologized. But Mullins said he took O'Neill's statement "as blaming the police officer in the street" for the laws and departmental flaws of the time.

Both Mullins and O'Neill joined the force in the 1980s.

The police inspector who led the raid, Seymour Pine, said in 2004 that he was sorry, according to news accounts of a talk he gave at the time. Pine died in 2010.

NYPD leaders have expressed some regret before about the events at the Stonewall, but until Thursday, they stopped short of a formal apology.

Former Commissioner William Bratton in 2016 called it "a terrible experience" but noted that it had also been "a tipping point" for change. He said an apology was unnecessary: "The apology is all that's occurred since then."

When O'Neill was asked the next year about apologizing for Stonewall, he said it had "been addressed already."

On Thursday, he addressed it frankly: "What happened should not have happened," he said.