(The Center Square) — New Jersey elected officials and candidates for office, as well as their family members, will be allowed to use campaign money to pay for security details under a bill signed by New Jersey Gov. Mikie Sherrill on Wednesday.

The legislation, which passed the Democratic controlled state Legislature with bipartisan support, authorizes fundraising committees to pay for security upgrades like surveillance cameras, bulletproof glass doors, and hire security guards.

The New Jersey Election Law Enforcement Commission is expected to draft regulations for the new law, which includes restrictions on purchasing firearms or ammunition or hiring family members to provide security. It also prohibits candidates or their campaigns from using the money for home improvements.

New Jersey is among several states that have taken steps in recent years to protect public officials and members of their families amid heightened concerns about the rise of political violence nationwide.

In 2020, then-Gov. Phil Murphy signed a law creating a state Office of Information Privacy to oversee requests from judges, state prosecutors, police officers and members of their families to have their home addresses redacted from public records.

The measure, called Daniel's Law, came in response to the 2020 murder of Daniel Anderl, who was shot and killed by an attorney and self-proclaimed "anti-feminist" who state prosecutors say was targeting Anderl’s mother, U.S. District Court Judge Esther Salas.

New Jersey lawmakers filed the security spending bill earlier this year in response to the high-profile political assassinations of former Democratic Minnesota House Speaker Melissa Hortman and her husband and conservative activist Charlie Kirk, who was shot and killed by a lone gunman during a speaking event at the Utah Valley University.

Congress passed a similar law, also named after Anderl, that protects federal judges by shielding personally identifiable information and that of their close relatives from public disclosure.

The measures have drawn criticism from open government groups who say the changes deliver a blow to transparency, allowing lawmakers to shield their properties they own.

But lawmakers who approved the laws say the changes are necessary to protect the safety of elected officials and their family members amid increasing threats.