New York Police Department Commissioner James P. O’Neill on Thursday apologized for the 1969 police raid on the Stonewall Inn, a gay bar in Greenwich Village, that caused an uprising and helped launch the modern-day LGBTQ rights movement.

“What happened should not have happened. The actions taken by the NYPD were wrong, plain and simple,” O’Neill said at a briefing on security preparations for the 50th anniversary of the riots on June 28. “The actions and the laws were discriminatory and oppressive, and for that, I apologize.”

In the early hours of Saturday, June 28, 1969, the NYPD attempted to enforce a law that made it illegal to serve alcohol to known homosexuals. While gay bar raids were not unusual, on this particular night, the patrons decided they had finally had enough. The police were met with resistance, which then unfolded into a full-on rebellion. The uprising lasted several nights and is widely credited with being the spark that ignited the modern-day LGBTQ rights movement.

The Stonewall Inn and the surrounding area has since become a national monument — the first to tell the story of the LGBTQ rights movement — and the bar, in the words of one of its current owners, has become a "gay church" of sorts.

The NYPD had never formally apologized for the raid, but pressure had been building from local politicians and civil rights organizations.

On Wednesday, for example, City Council Speaker Corey Johnson, who is gay, told 1010 WINS news that the NYPD should apologize, and on Thursday, Heritage of Pride, the nonprofit organization that runs the official NYC Pride March, said in a press release that it had voted unanimously to demand that the department do so.

“The department can never take back what it has done to LGBTQIA+ people, but it can and must take responsibility for it,” Heritage of Pride said. The group offered O’Neill a slot on the stage at the Stonewall commemoration rally to deliver an apology, writing “the platform is yours on June 28th.”

Their press release was sent just over an hour before the commissioner delivered his apology at NYPD headquarters.

Mark Segal, a long-time LGBTQ activist who was at the Stonewall Inn on the night of the raid, encouraged the NYPD commissioner to apologize to veterans of the Stonewall uprising in person on June 30, during the annual NYC Pride March.

"It would not only be welcomed, it would close the books on this chapter and give some of us closure," Segal told NBC News.

The NYPD's overall security briefing on Thursday touched upon the growing threat of right-wing extremism both domestically and abroad; NYPD officers said that this year’s Pride celebrations face new threats from white supremacists and jihadists.

FOLLOW NBC OUT ON TWITTER, FACEBOOK & INSTAGRAM