This paper explores the effect of the LMC on the mass estimates obtained from the timing argument. We show that accounting for the presence of the LMC systematically lowers the Local Group mass ($M_{rm LG}$) derived from the relative motion of the Milky Way--Andromeda pair. Motivated by this result we apply a Bayesian technique devised by Pe~narrubia et al. (2014) to simultaneously fit (i) distances and velocities of galaxies within 3~Mpc and (ii) the relative motion between the Milky Way and Andromeda derived from HST observations, with the LMC mass ($M_{rm LMC}$) as a free parameter. Our analysis returns a Local Group mass $M_{rm LG}=2.64^{+0.42}_{-0.38}times 10^{12}M_odot$ at a 68% confidence level. The masses of the Milky Way, $M_{rm MW}=1.04_{-0.23}^{+0.26}times 10^{12}M_odot$, and Andromeda, $M_{rm M31}=1.33_{-0.33}^{+0.39}times 10^{12}M_odot$, are consistent with previous estimates that neglect the impact of the LMC on the observed Hubble flow. We find a (total) LMC mass $M_{rm LMC}=0.25_{-0.08}^{+0.09}times 10^{12}M_odot$, which is indicative of an extended dark matter halo and supports the scenario where this galaxy is just past its first pericentric approach. Consequently, these results suggest that the LMC may induce significant perturbations on the Galactic potential.