We present the discovery of a previously unknown member of the immediate solar neighbourhood, DENIS-P J104814.7-395606.1 (hereafter DENIS 1048-39), identified while mining the DENIS database for new nearby stars. A HIRES echelle spectrum obtained with the 10-m Keck telescope shows that it is an M9 dwarf. DENIS 1048-39 has a very bright apparent magnitude (I=12.67) for its spectral type and colour (I-J=3.07), and is therefore very nearby. If it is single its distance is only 4.1 +/- 0.6 pc, ranking it as between our 12th and 40th closest neighbour. It is also the closest star or brown dwarf with a spectral type later than M7V. Its proper motion was determined through comparison of Sky atlas Schmidt plates, scanned by the MAMA microdensitometer, with the DENIS images. At 1.52\arcsec yr-1 it primarily attests the closeness of DENIS 1048-39 and hence its dwarf status. These characteristics make it an obvious target for further detailed studies. Based on observations made at the European Southern Observatory, and at the W. M. Keck Observatory, which is operated jointly by the University of California and the Californian Institute of Technology. Also based on plates scanned with the MAMA microdensitometer (http://dsmama.obspm.fr) developed and operated by INSU/CNRS/Observatoire de Paris.