A gallium-catalysed, direct cyanation reaction of aromatic and heteroaromatic C-H bonds with cyanogen bromide was developed as a practical synthetic method for the preparation of aromatic nitriles.