  A mean-field model explaining most of the details in the magnetic phase
diagram of ErNi_2B_2C is presented. The low-temperature magnetic properties are
found to be dominated by the appearance of long-period commensurate structures.
The stable structure at low temperatures and zero field is found to have a
period of 40 layers along the a direction, and upon cooling it undergoes a
first-order transition at T_C = 2.3 K to a different 40-layered structure
having a net ferromagnetic component of about 0.4 mu_B/Er. The
neutron-diffraction patterns predicted by the two 40-layered structures, above
and below T_C, are in agreement with the observations of Choi et al.
