The recent discovery of gravitational waves marks the culmination of a
sequence of successful tests of the general theory of relativity (GR) since its
formulation in 1915. Yet these tests remain confined to the scale of stellar
systems or the strong gravity regime. A departure from GR on larger,
cosmological scales has been advocated by the proponents of modified gravity
theories as an alternative to the Cosmological Constant to account for the
observed cosmic expansion history. While indistinguishable in these terms by
construction, such models on the other hand yield distinct values for the
linear growth rate of density perturbations and, as a consequence, for the
associated galaxy peculiar velocity field. Measurements of the resulting
anisotropy of galaxy clustering, when spectroscopic redshifts are used to
derive distances, have thus been proposed as a powerful probe of the validity
of GR on cosmological scales. However, despite significant effort in modelling
such redshift space distortions, systematic errors remain comparable to current
statistical uncertainties. Here, we present the results of a different
forward-modelling approach, which fully exploits the sensitivity of the galaxy
velocity field to modifications of GR. We use state-of-the-art, high-resolution
N-body simulations of a standard GR and a compelling f(R) model, one of GR's
simplest variants, to build simulated catalogues of stellar-mass-selected
galaxies through a robust match to the Sloan Digital Sky Survey observations.
We find that, well within the uncertainty of this technique, f(R) fails to
reproduce the observed redshift-space clustering on scales 1-10 Mpc/h. Instead,
the standard LCDM GR model agrees impressively well with the data. This result
provides a strong confirmation, on cosmological scales, of the robustness of
Einstein's general theory of relativity.