Since the discovery of the first extrasolar giant planets around Sun-like stars, evolving observational capabilities have brought us closer to the detection of true Earth analogues. The size of an exoplanet can be determined when it periodically passes in front of (transits) its parent star, causing a decrease in starlight proportional to its radius. The smallest exoplanet hitherto discovered has a radius 1.42 times that of the Earth's radius (R⊕), and hence has 2.9 times its volume. Here we report the discovery of two planets, one Earth-sized (1.03R⊕) and the other smaller than the Earth (0.87R⊕), orbiting the star Kepler-20, which is already known to host three other, larger, transiting planets. The gravitational pull of the new planets on the parent star is too small to measure with current instrumentation. We apply a statistical method to show that the likelihood of the planetary interpretation of the transit signals is more than three orders of magnitude larger than that of the alternative hypothesis that the signals result from an eclipsing binary star. Theoretical considerations imply that these planets are rocky, with a composition of iron and silicate. The outer planet could have developed a thick water vapour atmosphere.