The present invention relates to a process for the production of compounds of formula (I) wherein X is fluoro, chloro, bromo or iodo and n is 1, 2, 3 or 4, which process comprises reacting a compound of formula (II) wherein the substituents are as defined for formula (I), with inorganic nitrite in an acidic aqueous medium in the presence of bromide and a copper catalyst and wherein the process is carried out as a one-pot reaction.