If President Donald Trump changes the definition of gender to effectively exclude transgender people, Attorney General Maura Healey said state law will govern protections in Massachusetts.

The New York Times reported that in an internal memo, Trump administration officials floated the idea of updating the federal definition of gender to define it as a biological, immutable condition defined by genitalia at birth. This could eliminate rights for transgender people in areas like federal anti-discrimination laws.

"State law will control here as a matter of constitutional analysis," Healey said, speaking to editors and reporters at The Republican / MassLive.com on Thursday.

Healey said the federal efforts make it even more important that voters uphold Massachusetts' transgender anti-discrimination law, which is up for repeal in November. That law prohibits discrimination against transgender people in public places and lets transgender people use the bathroom that conforms with their gender identity.

Healey, who is gay, said the public accommodations law is about civil rights and human rights.

Even before the 2016 public accommodations law was passed, Massachusetts had a law prohibiting discrimination based on gender identity in employment, housing and schools. Healey said that law has worked well for several years.

"When you spend time with a transgender person or parent or family members, you see how particularly vulnerable transgender people are and why they disproportionately suffer high rates of suicide, homelessness, low socioeconomic levels," Healey said. "What this law has done is provide them equal treatment under the law."

Healey said she has been "offended" by the ads by opponents of the law, which she called "outrageous," "inaccurate," and a mischaracterization of the law.

One ad features a man peeping through a bathroom stall at a girl changing in a locker room, while another features a mother talking about a boy changing in a locker room with her daughter.

"For far too long, if you want to talk about bathrooms, it was transgender people who were getting assaulted and beat up in bathrooms," Healey said.

Healey said anyone who goes into a bathroom to commit a crime will be criminally prosecuted.