The present invention relates to a method for preparing halogenated imidazopyridine derivatives of the formula (II) proceeding from compounds of the formula (I) via intermediates of the formula (IVa) or (IVb)