Attosecond spectroscopy 1–7 can resolve electronic processes directly in time, but a movie-like space–time recording is impeded by the too long wavelength (~100 times larger than atomic distances) or the source–sample entanglement in re-collision techniques 8–11 . Here we advance attosecond metrology to picometre wavelength and sub-atomic resolution by using free-space electrons instead of higher-harmonic photons 1–7 or re-colliding wavepackets 8–11 . A beam of 70-keV electrons at 4.5-pm de Broglie wavelength is modulated by the electric field of laser cycles into a sequence of electron pulses with sub-optical-cycle duration. Time-resolved diffraction from crystalline silicon reveals a < 10-as delay of Bragg emission and demonstrates the possibility of analytic attosecond–angstrom diffraction. Real-space electron microscopy visualizes with sub-light-cycle resolution how an optical wave propagates in space and time. This unification of attosecond science with electron microscopy and diffraction enables space–time imaging of light-driven processes in the entire range of sample morphologies that electron microscopy can access. Attosecond light pulses are used to probe ultrafast processes. The experimental observation of attosecond electron pulses now promises the marriage of these techniques with electron microscopy and diffraction.