We propose a theory studying temptation in presence of both externally and internally sanctioned prohibitions. Moral values that (internally) sanction prohibited actions and their desire may increase utility by reducing self-control costs, thereby serving as partial commitment devices. We apply the model to crime and study the conditions under which agents would optimally adhere to moral values of honesty. Incentives to be moral are non- monotonic in the crime premium. Larger external punishments increase temptation and demand for morality, so that external and internal sanctions are complements. The model helps rationalizing stylized facts that proved difficult to explain with available theories.