Conducting nitrogen-containing carbon nanotubes were synthesized by the carbonization of self-assembled polyaniline nanotubes protonated with sulfuric acid. Carbonization was carried out in a nitrogen atmosphere at a heating rate of 10 degrees C min(-1) up to a maximum temperature of 800 degrees C. The carbonized polyaniline nanotubes which have a typical outer diameter of 100-260 nm, with an inner diameter of 20-170 nm and a length extending from 0.5 to 0.8 microm, accompanied with very thin nanotubes with outer diameters of 8-14 nm, inner diameters 3.0-4.5 nm and length extending from 0.3 to 1.0 microm, were observed by scanning and transmission electron microscopies. Elemental analysis showed 9 wt% of nitrogen in the carbonized product. Conductivity of the nanotubular PANI precursor, amounting to 0.04 S cm(-1), increased to 0.7 S cm(-1) upon carbonization. Molecular structure of carbonized polyaniline nanotubes has been analyzed by FTIR and Raman spectroscopies, and their paramagnetic characteristics were compared with the starting PANI nanotubes by EPR spectroscopy.