Chlorosulfonyl isocyanate (CSI) reacts not only with pyrrole itself but with pyrroles having powerful electron-withdrawing groups in the 2-position. Suitable choice of electron- withdrawing groups allows selective 4-substitution of the pyrrole ring. The N-chlorosulfonyl amides formed are readily converted to the corresponding nitriles. The procedure has been used to provide syntheses of pyrrole-3-carbonitrile and its 1-methyl homologue.