New York is filing an amicus brief in support of overturning a controversial North Carolina measure that is seen as discriminatory toward LGBT people, Gov. Andrew Cuomo announced on Thursday.

Among other provisions, the measure known as HB2 bars transgender people from using restrooms that conform with their gender identity and blocks local governments in the state from passing their own versions of LGBT protection legislation.

“Discriminating against people on the basis of their gender identity is not just wrong, it is undeniably illegal,” Cuomo said in a statement. “This kind of divisiveness cannot be allowed to stand. I urge the court to overturn HB2 and uphold the basic principle of equality and justice for all.”

Updated: The amicus brief itself is being drafted by Attorney General Eric Schneiderman’s office, which had also previously banned travel to the state.

Schneiderman’s office has also launched a sensitivity training program for hospitals across the state.

The amicus filing would be filed in support of a lawsuit challenging the legislation by Lambda Legal, the ACLU, the ACLU of North Carolina and Equality North Carolina

New York’s brief would come as the U.S. Department of Justice has warned North Carolina its legislation likely violates civil rights, which could lead to a loss of federal funds for the state.

Earlier this year in March, Cuomo announced “non-essential” state travel to North Carolina would banned in response to the measure.

Cuomo late last year announced he would issue regulations aimed at blocking discrimination of transgender individuals in a variety of areas, ranging from housing to the workplace.

The regulations, approved based on the state’s human rights law, include many of the protections proposed under the Gender Expression Non-Discrimination Act, which has languished in the Legislature.