The diazotation of 3-bromo-4-chloroaniline (I) with NaNO2 - HCl in water followed by reduction with NaHSO3 gives 3-bromo-4-chlorophenylhydrazine (II), which is condensed with ethyl 2-pyridylpyruvate (III) by means of dry HCl in ethanol yielding 3-bromo-4-chlorophenylhydrazone of ethyl 2-pyridylpyruvate (IV). The cyclization of (IV) by means of H2SO4 in hot acetic acid affords ethyl-6-bromo-5-chloro-3-(2-pyridyl)indole-2-carboxylate (V), which is finally treated with the sodium salt of DMSO (VI) (prepared with NaH and DMSO) in the same solvent.