Context. The origin of X-ray Flashes (XRFs) is still a mystery and several models have been proposed. To disentangle among these models, an important observational tool is the measure of the XRF distance scale, so far available only for a few of them.
Aims. In this work, we present a multi-wavelength study of XRF 040912, aimed at measuring its distance scale and the intrinsic burst properties.
Methods. We performed a detailed spectral and temporal analysis of both the prompt and the afterglow emission and we estimated the distance scale of the likely host galaxy. We then used the currently available sample of XRFs with known distance to discuss the connection between XRFs and classical Gamma-ray Bursts (GRBs).
Results. We found that the prompt emission properties unambiguously identify this burst as an XRF, with an observed peak energy of E(p) = 17 +/- 13 keV and a burst fluence ratio S(2-30 keV)/S(30-400) keV > 1. A non-fading optical source with R similar to 24 mag and with an apparently extended morphology is spatially consistent with the X-ray afterglow, likely the host galaxy. XRF 040912 is a very dark burst since no afterglow optical counterpart is detected down to R > 25 mag (3 sigma limiting magnitude) at 13.6 h after the burst. The host galaxy spectrum detected from 3800 angstrom to 10 000 angstrom, shows a single emission line at 9552 angstrom. The lack of any other strong emission lines blue-ward of the detected one and the absence of the Ly alpha cut-off down to 3800 angstrom are consistent with the hypothesis of the [OII] line at redshift z = 1.563 +/- 0.001. The intrinsic spectral properties rank this XRF among the soft GRBs in the E(peak)-E(iso) diagram. Similar results were obtained for most XRFs at known redshift. Only XRF 060218 and XRF 020903 represent a good example of instrinsic XRF (i-XRF) and are possibly associated with a different progenitor population. This scenario may call for a new definition of XRFs.