Local governments and law enforcement leaders lobbied aggressively against the legislation