A strict law serves as a deterrent to crime.
The presence of a deterrent made the pests stay away from the crops.
The new law is expected to be a deterrent against crime.