Police officers across New Jersey must follow new rules related to interacting with transgender and nonbinary people, a move the state attorney general says will protect residents from discrimination based on gender identity.

Attorney General Gurbir S. Grewal announced the new police directive Wednesday, which was the national Transgender Day of Remembrance, memorializing people killed as a result of anti-trans violence.

The directive applies to all state, county, and local law enforcement agencies, and all officers in New Jersey must be trained on it by June 1.

The directive requires officers to address people by the name and pronouns associated with their gender identity, even if that name isn’t on official records. It also states officers should never publicly disclose a person’s sexual orientation or gender assigned at birth without consent of the person or unless for a “proper law enforcement purpose." And, it notes, “as a general rule” officers should treat a person based on their gender identity regardless of gender assigned at birth.

The new rules also say officers should not subject a person to invasive search procedures because of their gender identity or sexual orientation, and should not inquire about sexual practices or anatomy “unless it is necessary to an ongoing criminal investigation.”

The directive also requires county prosecutors to make efforts to educate the public about the new guidelines.

“Building on the extraordinary work of law enforcement agencies across this country and right here in New Jersey,” Grewal said in a news release, “we’re ensuring that our officers will act in ways that promote the dignity and safety of LGBTQ individuals, whether they are victims, witnesses, suspects, arrestees, or other members of the public.”

Some municipalities in New Jersey already have directives for police interactions with trans people. In April, Newark police instituted new policies requiring officers to not question a person’s gender identity. Officers must also use a person’s chosen name and allow a transgender person to be housed separately from other inmates.

Philadelphia police in June updated department policy on interactions with transgender and nonbinary people, including requiring that police use a person’s preferred name if it differs from their legal name. Philadelphia’s policy also says police also must make efforts to transport and house transgender or nonbinary individuals, if taken into custody, separately from other inmates.

In addition to the police directive, Grewal’s office also announced an awareness campaign designed to educate the public about discrimination protections for LGBTQ people, as well as updated policies from the Juvenile Justice Commission regarding the care of LGBTQ youth in the state’s care.

Here’s the full police directive: