Disclosed are compositions containing nanoparticles of a metal nitride, boride, silicide, or carbide, a filler material, and a carbonaceous matrix. The precursor to this material contains nanoparticles or particles of boron, silicon, iron, a refractory metal, or a refractory metal hydride, an organic compound having carbon and hydrogen, and a filler material. Multilayered materials are also disclosed.