A new graphitic material has the empirical formula C3N3P and comprises triazine rings bound together by phosphorus atoms, and/or other 5- or 6-membered rings with various carbon, nitrogen, and phosphorous connectivity. The material is made by polymerizing P(CN)3, for example by using a temperature of at least 220° C. and an elevated pressure, optionally as high as 1500° C. and 12 GPa.