I've just lost a word I use frequently whenever talking about the reasons for punishments.
The word should (I think) fill the blank: Punishments, such as jail time, __ people from doing crime.
The word is related to stopping, hindrance, incentive, restrict, etc.
In this usage, it should also imply that it stops people from committing crime because they don't want to go to jail. Jail also stops people from committing crimes because they can't leave jail. It should fit both of these simultaneously.
I hope this isn't too far of a stretch.