Adaptive-optics systems can in principle allow a telescope to achieve performance at its theoretical maximum (limited only by diffraction), by correcting in real time for the distortion of starlight by atmospheric turbulence. For such a system installed on an 8-m-class telescope, the spatial resolution and sensitivity could be up to 100 times better than conventional imaging. Adaptive-optics corrections have hitherto been achieved only for regions of the sky within a few arcseconds of a bright reference source. But it has been proposed theoretically that by using multiple guide stars, the tomography of atmospheric turbulence could be probed and used to extend adaptive-optics corrections to the whole sky. Here we report the experimental verification of such tomographic corrections, using three off-axis reference stars approximately 15 arcsec from the central star. We used the observations of the off-axis stars to calculate the deformations of the wavefront of the central star, and then compare them with the real measured values. This tomographic approach is found to reduce variations in the wavefront by approximately 92%. Our result demonstrates that a serious barrier to achieving diffraction-limited seeing over the whole sky has been removed.