The X-ray transient source XTE J1818−245 went through an outburst in 2005 that was observed during a multiwavelength campaign from radio to soft γ-rays. Observations in V and R optical bands with the 1-m Swope telescope allowed the discovery of a new bright source. As we aimed to reveal the nature of the companion star, we performed new optical observations with the ESO/NTT telescope at La Silla, both in photometry and spectroscopy. We confirm the optical counterpart found by the Swope telescope, but the spectral type of the secondary star could not be identified. The spectrum showed a blue-dominated shape and an Hα emission line was detected, indicating that the optical emission was dominated by the presence of an accretion disc. The broad-band spectral energy distribution revealed that the outer parts of the accretion disc had to be irradiated by its inner parts to explain the optical emission. New observations of XTE J1818−245 in quiescence are needed to find the nature of the companion star. Moreover, radio-to-X-ray strictly simultaneous observations of transient black holes are needed to disentangle the importance of jets and irradiated accretion discs in the infrared–optical–ultraviolet domain.