As-received commercial single-walled carbon nanotubes (SWCNTs) were treated in mild, inorganic polyacid, viz. polyphosphoric acid (PPA) with or without additional phosphorous pentoxide (P(2)O(5)) at 130, 160, and 190 degrees C. Unlike the treatment in strong acids such as nitric acid/sulfuric acid mixtures, nitric acid and hydrochloric acid, PPA with or without additional P(2)O(5) could selectively remove the tenacious carbonaceous and metallic impurities with little or no damage to the basic frameworks of SWCNTs and crystalline carbon materials. Since the medium PPA/P(2)O(5) is known for an efficient "direct" Friedel-Crafts acylation using a carboxylic acid instead of a carboxylic acid chloride, it provides the advantage of combining both purification and functionalization steps into a one-pot process in manufacturing of functionalized SWCNTs.