Aims. The aim of this paper is to study the environment and intervening absorbers of the gamma-ray burst GRB 090926A through analysis of optical spectra of its afterglow. Methods. We analyze medium resolution spectroscopic observations (R = 10000, corresponding to 30 km s −1 , S/N= 15 − 30 and wavelength range 3000 − 25000) of the optical afterglow of GRB 090926A, taken with X-shooter at the VLT ∼ 22 hr after the GRB trigger.Results. The spectrum shows that the ISM in the GRB host galaxy at z = 2.1071 is rich in absorption features, with two components contributing to the line profiles. In addition to the ground state lines, we detect C II, O I, Si II, Fe II and Ni II excited absorption features. No host galaxy emission lines, molecular absorption features nor diffuse interstellar bands are detected in the spectrum. The line of sight of GRB 090926A presents four weak intervening absorption systems in the redshift range 1.24 < z < 1.95. Conclusions. The Hydrogen column density associated to GRB 090926A is log N H /cm −2 = 21.60 ± 0.07, and the metallicity of the host galaxy is in the range [X/H] = 3.2 × 10 −3 − 1.2 × 10 −2 with respect to the solar values, i.e., among the lowest values ever observed for a GRB host galaxy. A comparison with galactic chemical evolution models has suggested that the host of GRB090926A is likely to be a dwarf irregular galaxy. No emission lines were detected, but we note that a Hα flux in emission of 9 × 10 −18 erg s −1 cm −2 (i.e., a star formation rate of 2 M ⊙ yr −1 ), which is typical of many GRB hosts, would have been detected in our spectra, and thus emission lines are well within the reach of X-shooter. We put an upper limit to the H molecular fraction of the host galaxy ISM, which is f < 7 × 10 −7 . The continuum has been fitted assuming a power-law spectrum, with a spectral index of β = 0.89 +0.02 −0.02 . The best fit does not essentially require any intrinsic extinction since E B−V < 0.01 mag adopting a SMC extinction curve. We derive information on the distance between the host absorbing gas and the site of the GRB explosion. The distance of component I is found to be 2.40 ± 0.15 kpc, while component II is located far away from the GRB, possibly at ∼ 5 kpc. These values are compatible with that found for other GRBs.