A graphite-like semiconducting (p-type) solid of composition BC3N was synthesized by interaction of poly(acrylonitrile) with boron trichloride at 400 degrees C or acrylonitrile with boron trichloride at 1000 degrees C. Treatment of acrylonitrile-butadiene-stylene (ABS) or acrylonitrile-stylene (AS) copolymer with boron trichloride at 400 degrees C resulted in a formation of a graphite-like solid of composition BC7N.