  High resolution spectropolarimetric observations of the strongly magnetic,
super-slowly rotating rapidly oscillating Ap star HD166473 are used to
investigate the implications of the presence of a variable strong magnetic
field on the vertical and surface horizontal distribution of various chemical
elements. The analysis of the calculated LSD Stokes $I$ and $V$ profiles
confirms the previously reported detection of non-uniform horizontal surface
distribution of several chemical elements. To test the vertical abundance
stratification of iron peak and rare earth elements, magnetic field
measurements were carried out using spectral lines of these elements belonging
to neutral and ionised stages. We find clear indication of the existence of a
relation between the magnetic field strength and its orientation and vertical
element stratification: magnetic field values obtained for elements in
different stages close to the magnetic equator are rather similar whereas the
dispersion in field strengths is remarkably large in the regions close to
magnetic field poles. At the phases of negative and positive extrema the mean
longitudinal field strength determined from the analysis of the REE lines is
usually stronger than when using Fe and Cr. The strongest mean longitudinal
magnetic field, up to $-$4160$\pm$226 G, is detected using the La II line list
at the negative extremum, followed by the measurements using the Pr III lines
with $\langle B_z \rangle$=$-$3740$\pm$343 G and the Ce II lines with $\langle
B_z \rangle$=$-$3372$\pm$247 G. The strongest mean longitudinal magnetic field
of positive polarity, up to 3584$\pm$354 G is detected using the Pr III lines,
followed by the measurement $\langle B_z \rangle$=2517$\pm$249 G using the Ce
II lines.
