Abstract: When would an individual expect adherence to the law to advance the social good? This time-honored question is of more than intellectual interest, for if individuals have some desire to foster social welfare, the answer to it may help to explain and guide actual compliance with the law. In the model that I study, an individual’s knowledge of factors relevant to social welfare is inferior to lawmakers’ in some respects and superior in others. Thus, in assessing whether obeying legal rules would promote social welfare, an individual must consider that rules will impound certain superior information of lawmakers but also that rules may fail to reflect his private information. A second issue that an individual must consider in deciding whether following the law would be desirable is a compliance externality: the effect of the witnessing of his compliance behavior on the compliance behavior of observers. The conclusions from the model are interpreted, including their implications for actual compliance and for the moral obligation to obey the law.