Palladium hydrides display the largest isotope effect anomaly known in literature. Replacement of hydrogen with the heavier isotopes leads to higher superconducting temperatures, a behavior inconsistent with harmonic theory. Solving the self-consistent harmonic approximation by a stochastic approach, we obtain the anharmonic free energy, the thermal expansion and the superconducting properties fully ab initio. We find that the phonon spectra are strongly renormalized by anharmonicity far beyond the perturbative regime. Superconductivity is phonon mediated, but the harmonic approximation largely overestimates the superconducting critical temperatures. We explain the inverse isotope effect, obtaining a -0.38 value for the isotope coefficient in good agreement with experiments, hydrogen anharmonicity being the main responsible for the isotope anomaly.PACS numbers: 74.20.Pq,63.20.Ry,74.25.Kc The explanation of the ion-mass isotope effect in phonon-mediated superconductors is one of the greatest success of BCS theory [1]. In a BCS superconductor composed of only one type of ions of mass M , the superconducting critical temperature (T c ) is expected to behave as T c ∝ M −α , where α = 0.5 is the isotope coefficient. In conventional superconductors with more atomic species, the total isotope coefficient should also be close to 0.5. However, in many superconductors like MgB 2 [2], fullerides [3] or high-T c cuprates [4-6] the isotope coefficient is substantially reduced and, in the most extreme case of palladium hydrides (PH), it is even negative [7][8][9].An isotope coefficient α = 0.5 relies on the following assumptions: (i) the phonon frequencies are harmonic, consequently, (ii) the electron-phonon interaction is mass independent, and (iii) the electron-electron interaction is not affected by the isotope substitution. Thus, a reduced isotope effect can either be the fingerprint of a non-conventional mechanism (e.g. spin-fluctuations or correlated superconductivity) or the breakdown of one of these assumptions (e.g. anharmonicity). In both cases, the superconducting state is considered anomalous and current state-of-the-art calculations do not quantitatively account for the behavior of T c as a function of the isotope mass. This is due to the difficulties of dealing either with non-conventional mechanisms or with anharmonicity.Here we consider the most pathological case present in literature, the inverse isotope effect in PH. PdH has T c = 8−9K [7,8]. Hydrogen substitution with the heavier deuterium leads to a higher T c , as T c (PdD) ≈ 10−11K [7,8], leading to α = −[lnT c (PdD) − lnT c (PdH)]/ln2 ≈ −0.3. Remarkably, PdT has a higher T c than PdD, but there is no experimental value at full stoichiometry [9]. A considerable theoretical and experimental effort [10][11][12][13][14][15][16][17][18][19][20][21][22] has been devoted to explain this phenomenon over the last decades. Karakozov et al. [10], in a pioneering work, studied anharmoniciy in PH in the framework of perturbation theory to the bare harmonic phonon...