White dwarfs represent the endpoint of stellar evolution for stars with initial masses between approximately 0.07 and 8-10, where is the mass of the Sun (more massive stars end their life as either black holes or neutron stars). The theory of stellar evolution predicts that the majority of white dwarfs have a core made of carbon and oxygen, which itself is surrounded by a helium layer and, for ~80 per cent of known white dwarfs, by an additional hydrogen layer. All white dwarfs therefore have been traditionally found to belong to one of two categories: those with a hydrogen-rich atmosphere (the DA spectral type) and those with a helium-rich atmosphere (the non-DAs). Here we report the discovery of several white dwarfs with atmospheres primarily composed of carbon, with little or no trace of hydrogen or helium. Our analysis shows that the atmospheric parameters found for these stars do not fit satisfactorily in any of the currently known theories of post-asymptotic giant branch evolution, although these objects might be the cooler counterpart of the unique and extensively studied PG1159 star H1504+65 (refs 4-7). These stars, together with H1504+65, might accordingly form a new evolutionary sequence that follows the asymptotic giant branch.