  Gamma-ray haloes can exist around galaxies due to the interaction of escaping
galactic cosmic rays with the surrounding gas. We have searched for such a halo
around the nearby giant spiral Andromeda galaxy M31 using almost 7 years of
Fermi LAT data at energies above 300 MeV. The presence of a diffuse gamma-ray
halo with total photon flux $2.6\pm 0.6\times 10^{-9}$ cm$^{-2}$~s$^{-1}$,
corresponding to a luminosity (0.3-100 GeV) of $(3.2\pm 0.6)\times 10^{38}$ erg
s$^{-1}$ (for a distance of 780~kpc) was found at a 5.3$\sigma$ confidence
level. The halo form does not correspond to the extended baryonic HI disc of
M31, as would be expected in hadronic production of gamma photons from cosmic
ray interaction, nor it is spherically symmetric, as could be in the case of
dark matter annihilation. The best-fit halo template corresponds to two 6-7.5
kpc bubbles symmetrically located perpendicular to the M31 galactic disc,
similar to the 'Fermi bubbles' found around the Milky Way centre, which
suggests the past activity of the central supermassive black hole or a
star-formation burst in M31.
