TRENTON, N.J. (AP) — New Jersey Democratic Gov. Phil Murphy signed legislation Wednesday expanding the definition of terrorism under state law in response to last month's fatal attack on a kosher market in Jersey City.

Murphy said the new law will make it clear that New Jersey is committed to the elimination of “hate in all its forms.” The legislation passed unanimously in the Democrat-led Legislature on Monday, about a month after the attack that left a Jersey City police detective dead, along with three people inside the market.

Authorities have said that the attackers, David Anderson and Francine Graham, who both died in a gunfight with police, had expressed hatred of Jews and law enforcement.

"This legislation is crucial to making it clear that hatred will not be tolerated in our state," Murphy said in a statement.

The new law says terrorism includes crimes aimed at inciting terror against people based on their religion, race or national origin, among other factors.

Previous law said someone was guilty of terrorism if the person committed crimes aimed at promoting terror, terrorizing five or more people, influencing government policy through terror or impairing public transportation, communication, or other public services.

Murphy also signed a bill that sets aside $1 million for security grants for nonprofits. Murphy said the money would be open to nonprofit organizations across the state that face the “greatest risk of terrorist attacks.”