We present high-resolution spectroscopic observations of GRB 060418, obtained with VLT/UVES. These observations were triggered using the VLT Rapid-Response Mode (RRM), which allows for automated observations of transient phenomena, without any human intervention. This resulted in the first UVES exposure of GRB 060418 to be started only 10 min after the initial Swift satellite trigger. A sequence of spectra covering 330−670 nm were acquired at 11, 16, 25, 41 and 71 minutes (mid-exposure) after the trigger, with a resolving power of 7 km s −1 , and a signal-to-noise ratio of 10−15. This time-series clearly shows evidence for time variability of allowed transitions involving Fe II fine-structure levels ( 6 D 7/2 , 6 D 5/2 , 6 D 3/2 , and 6 D 1/2 ), and metastable levels of both Fe II ( 4 F 9/2 and 4 D 7/2 ) and Ni II ( 4 F 9/2 ), at the host-galaxy redshift z = 1.490. This is the first report of absorption lines arising from metastable levels of Fe II and Ni II along any GRB sightline. We model the observed evolution of the level populations with three different excitation mechanisms: collisions, excitation by infra-red photons, and fluorescence following excitation by ultraviolet photons. Our data allow us to reject the collisional and IR excitation scenarios with high confidence. The UV pumping model, in which the GRB afterglow UV photons excite a cloud of atoms with a column density N, distance d, and Doppler broadening parameter b, provides an excellent fit, with best-fit values: log N(Fe II) = 14.75 +0.06 −0.04 , log N(Ni II) = 13.84 ± 0.02, d = 1.7 ± 0.2 kpc, and b = 25 ± 3 km s −1 . The success of our UV pumping modeling implies that no significant amount of Fe II or Ni II is present at distances smaller than ∼1.7 kpc, most likely because it is ionized by the GRB X-ray/UV flash. Because neutral hydrogen is more easily ionized than Fe II and Ni II, this minimum distance also applies to any H I present. Therefore the majority of very large H I column densities typically observed along GRB sightlines may not be located in the immediate environment of the GRB. The UV pumping fit also constrains two GRB afterglow parameters: the spectral slope, β = −0.5 +0.8 −1.0 , and the total rest-frame UV flux that irradiated the cloud since the GRB trigger, constraining the magnitude of a possible UV flash.