In the book Dei Delitti e Delle Pene by Beccaria, "he posited that the greatest deterrent was the certainty of detection: the more swift and certain the punishment, the more effective it would be. It would also allow a less serious punishment to be effective if shame and an acknowledgment of wrongdoing was a guaranteed response to society's judgment. Thus, the prevention of crime was achieved through a proportional system that was clear and simple to understand, and if the entire nation united in their own defense." ~Wikipedia
Therefore, the most important deterrent of classical theory is the certainty of detection.