The (111)-2 × 1 surface of in situ cleaved heavily P- or B-doped Si is investigated by scanning tunnelling microscopy and spectroscopy at room temperature and at low temperature. P atoms have been identified on different sites of the Si(111)-2 × 1 surface by their characteristic voltage-dependent contrast for positive as well as negative buckling of the π-bonded chains. The distributions of dopants per surface area and of nearest-neighbour distances are found to be in agreement with a random arrangement of dopants in Si up to doping levels well above the metal–insulator transition. In addition, P atoms have been identified by their depth-dependent contrast down to the third layer beneath the surface with a volume density in agreement with the bulk doping density. The random electronic disorder supports the view of an Anderson transition driven by disorder close to the critical concentration or critical uniaxial stress.