Context. XSS J1227.0-4859 is a peculiar, hard X-ray source recently positionally associated to the Fermi-LAT source 1FGL J1227.9-4852/2FGL J1227.7-4853. Multi-wavelength observations have added information on this source, indicating a low-luminosity lowmass X-ray binary (LMXB), but its nature is still unclear. Aims. To progress in our understanding, we present new X-ray data from a monitoring campaign performed in 2011 with the XMM-Newton, RXTE, and Swift satellites and combine them with new gamma-ray data from the Fermi and AGILE satellites. We complement the study with simultaneous near-UV photometry from XMM-Newton and with previous UV/optical and near-IR data. Methods. We analysed the temporal characteristics in the X-rays, near-UV, and gamma rays and studied the broad-band spectral energy distribution from radio to gamma rays. Results. The X-ray history of XSS J1227 over 7 yr shows a persistent and rather stable low-luminosity (6 × 10 33 d 2 1 kpc erg s −1 ) source, with flares and dips being peculiar and permanent characteristics. The associated Fermi-LAT source 2FGL J1227.7-4853 is also stable over an overlapping period of 4.7 yr. Searches for X-ray fast pulsations down to msec give upper limits to pulse fractional amplitudes of 15 − 25% that do not rule out a fast spinning pulsar. The combined UV/optical/near-IR spectrum reveals a hot component at ∼13 kK and a cool one at ∼4.6 kK. The latter would suggest a late-type K2−K5 companion star, a distance range of 1.4−3.6 kpc, and an orbital period of 7-9 h. A near-UV variability ( 6 h) also suggests a longer orbital period than previously estimated. Conclusions. The analysis shows that the X-ray and UV/optical/near-IR emissions are more compatible with an accretion-powered compact object than with a rotational powered pulsar. The X-ray to UV bolometric luminosity ratio could be consistent with a binary hosting a neutron star, but the uncertainties in the radio data may also allow an LMXB black hole with a compact jet. In this case, it would be the first associated with a high-energy gamma-ray source.