NY1 has learned that the Legal Aid Society will be taking the NYPD to court. 

The Society says it's suing the department for enforcing a law that wrongfully targets and arrests transgender women believed to be prostitutes. 

The lawsuit claims officers profile women as prostitutes based on their appearance, going by factors like their clothing, ethnicity and gender identity. 

The Legal Aid Society says the law, "loitering for the purpose of prostitution," has existed for around four decades, and mostly affects trangender women of color. 

One defendant, who chose not to be identified, says she's been arrested 14 times after being wrongly targeted as a prostitute. 

"It's traumatizing, it's degrading, because we're thrown in situations where we shouldn't have to be in, just for being who we are and being in places where people don't want us," she said.

"The women who are arrested, cis and transgender women of color, all the same thing. 'I was arrested for basically just living my life. I was arrested because of the way I dressed,'" said Tina Luongo, attorney-in-charge at the Legal Aid Society.

According to the lawsuit, 85 percent of those arrested are either black or Hispanic. 

The NYPD says it will respond once the lawsuit has been reviewed by its legal bureau.