California plans to institute some of the country’s strictest measures to govern the use of deadly force by law enforcement.

The proposed legislation, Assembly Bill 392, passed the state senate 29-1 on Monday with support from both parties. A year in the making, the law would restrict the use of deadly force by law enforcement to instances when officers believe it is “necessary.” Previously, officers needed only reasonable cause to use deadly force.

A “necessary” instance, as defined in the bill, is any situation where the officers or public face an imminent threat of death or serious bodily harm.

The totality of circumstances surrounding the situation will be taken into account when evaluating force under the new law, according to the Sacramento Bee. The officer’s actions before and after the incident, whether any deescalation techniques were used as an alternative, and the “facts known to the peace officer at the time” will be assessed.

California lawmakers have worked hard to satisfy both civil rights organizations and law enforcement agencies. After dropping a provision that would hold officers criminally liable for a violation, police lobbyists got on board. The American Civil Liberties Union of California is also supporting the legislation.

“It’s taken a long year of commitment by a lot of people,” Senate President Pro Tempore Toni Atkins said. “It was not a simple thing to weave together, to keep the parties coming together to work toward something we could agree upon.”

Assemblyman Kevin McCarty and Assemblywoman Shirley Weber, both Democrats, introduced the legislation in April 2018 after the fatal shooting of Stephon Clark. Clark, who was thought to be robbing a car, was shot by police in March 2018 when officers mistook his cellphone for a gun.

California Gov. Gavin Newsom, who is expected to sign the bill, is optimistic the “important bill” will “help restore community trust in [the] criminal justice system."