  In order that discrete symmetries should not be violated by gravitational
effects, it is necessary to gauge them. In this paper we discuss the gauging of
$\Z_N$ from the breaking of a high energy $SU(N)$ gauge symmetry, and derive
consistency conditions for the resulting discrete symmetry fr om the
requirement of anomaly cancellation in the parent symmetry. These results are
then applied to a detailed analysis of the possible discrete symmetries
forbidding proton decay in the minimal supersymmetric standard model.
