(CNN) Fifty years after the historic Stonewall riots, the New York Police Department apologized to the LGBT community for its role in the violence.

"The actions taken by the NYPD [at Stonewall] were wrong, plain and simple," police commissioner James O'Neill said Thursday during a Pride Month safety briefing.

He called the frequent harassment of LGBT men and women and laws that prohibited same-sex sexual relations "discriminatory and oppressive" and apologized on behalf of the department to the audience's applause.

The June 1969 uprising that began at the Stonewall Inn in Greenwich Village is largely considered to have spurred the gay rights movement, after police raided the gay bar and patrons resisted arrest, sparking a six-day protest.

The first Pride parade was hosted on Stonewall's one-year anniversary.

Read More