  The inclination of M31 is too close to edge-on for a bar component to be
easily recognised and is not sufficiently edge-on for a boxy/peanut bulge to
protrude clearly out of the equatorial plane. Nevertheless, a sufficient number
of clues allow us to argue that this galaxy is barred. We use fully
self-consistent N-body simulations of barred galaxies and compare them with
both photometric and kinematic observational data for M31. In particular, we
rely on the near infrared photometry presented in a companion paper. We compare
isodensity contours to isophotal contours and the light profile along cuts
parallel to the galaxy major axis and offset towards the North, or the South,
to mass profiles along similar cuts on the model. All these comparisons, as
well as position velocity diagrams for the gaseous component, give us strong
arguments that M31 is barred. We compare four fiducial N-body models to the
data and thus set constraints on the parameters of the M31 bar, as its
strength, length and orientation. Our `best' models, although not meant to be
exact models of M31, reproduce in a very satisfactory way the main relevant
observations. We present arguments that M31 has both a classical and a
boxy/peanut bulge. Its pseudo-ring-like structure at roughly 50' is near the
outer Lindblad resonance of the bar and could thus be an outer ring, as often
observed in barred galaxies. The shape of the isophotes also argues that the
vertically thin part of the M31 bar extends considerably further out than its
boxy bulge, i.e. that the boxy bulge is only part of the bar, thus confirming
predictions from orbital structure studies and from previous N-body
simulations.
