We discuss a recently developed approach to infrared modifications of GR, in which a mass term is introduced as a coefficient of nonlocal operators. We discuss conceptual aspects and cosmological consequences of the proposal. Such nonlocal theories, involving retarded propagators, must be understood as effective classical theories derived from some more fundamental (and local) QFT. The theory only involve a mass parameter $m$, which replaces the cosmological constant in LCDM, and is highly predictive. At the background level, after fixing $m$ so as to reproduce the observed value of $\Omega_M$, we get a pure prediction for the equation of state of dark energy as a function of redshift, $w_{\rm DE}(z)$, with $w_{\rm DE}(0)$ in the range $[-1.165,-1.135]$ as $\Omega_M$ varies over the broad range $\Omega_M\in[0.20,0.36]$. We find that the cosmological perturbations are well-behaved, and the model fully fixes the dark energy perturbations as a function of redshift $z$ and wavenumber $k$. The nonlocal model provides a good fit to supernova data and predicts deviations from General Relativity in structure formation and in weak lensing at the level of 3-4\%, therefore consistent with existing data but readily detectable by future surveys.