We report the discovery of periodic intensity dips in the X-ray source XMMU J004314.1+410724 , in the globular cluster Bo158 in M31 . The X-ray flux was modulated by \sim 83 \% at a period of 2.78 hr ( 10017 s ) in an XMM-Newton observation taken 2002 Jan 6-7 . The X-ray intensity dips show no energy dependence . We detected weaker dips with the same period in observations taken 2000 June 25 ( XMM-Newton ) and 1991 June 26 ( ROSAT /PSPC ) . The amplitude of the modulation has been found to be anticorrelated with source X-ray flux : it becomes lower when the source intensity rises . The energy spectrum of Bo158 was stable from observation to observation , with a characteristic cutoff at \sim 4 - 6 keV . The photo-electric absorption was consistent with the Galactic foreground value . No significant spectral changes were seen in the course of the dips . If the 2.78 hr cycle is the binary period of Bo158 the system is highly compact , with a binary separation of \sim 10 ^ { 11 } cm . The association of the source with a globular cluster , together with spectral parameters consistent with Galactic neutron star sources , suggests that X-rays are emitted by an accreting neutron star . The properties of Bo 158 are somewhat reminiscent of the Galactic X-ray sources exhibiting a dip-like modulations . We discuss two possible mechanisms explaining the energy-independent modulation observed in Bo 158 : i ) the obscuration of the central source by highly ionized material that scatters X-rays out of the line of sight ; ii ) partial covering of an extended source by an opaque absorber which occults varying fractions of the source . Subject headings : galaxies : individual ( M31 ) — stars : individual ( Bo158 ) — galaxies : star clusters — X-rays : galaxies — X-rays : stars