Deuterium and lithium are light elements of high cosmological and astrophysical importance. In this work we report the first detection of deuterated molecules and a search for lithium hydride, 7LiH, at redshift z = 0.89 in the spiral galaxy intercepting the line of sight to the quasar PKS 1830−211. We used ALMA to observe several submillimeter lines of ND, NH2D, and HDO, and their related isotopomers NH2, NH3, and H218O, in absorption against the southwest image of the quasar, allowing us to derive XD/XH abundance ratios. The absorption spectra mainly consist of two distinct narrow velocity components for which we find remarkable differences. One velocity component shows XD/XH abundances that is about 10 times larger than the primordial elemental D/H ratio, and no variability of the absorption profile during the time span of our observations. In contrast, the other component shows a stronger deuterium fractionation. Compared to the first component, this second component has XD/XH abundances that are 100 times larger than the primordial D/H ratio, a deepening of the absorption by a factor of two within a few months, and a rich chemical composition, with relative enhancements of N2H+, CH3OH, SO2 and complex organic molecules. We therefore speculate that this component is associated with the analog of a Galactic dark cloud, while the first component is likely more diffuse. Our search for the 7LiH (1–0) line was unsuccessful and we derive an upper limit 7LiH/H2 = 4 × 10−13 (3σ) in the z = 0.89 absorber toward PKS 1830−211. Besides, with ALMA archival data, we could not confirm the previous tentative detections of this line in the z = 0.68 absorber toward B 0218+357; we derive an upper limit 7LiH/H2 = 5 × 10−11 (3σ), although this is less constraining than our limit toward PKS 1830−211. We conclude that, as in the Milky Way, only a tiny fraction of lithium nuclei are possibly bound in LiH in these absorbers at intermediate redshift.