Laser cooling and electromagnetic traps have led to a revolution in atomic physics, yielding dramatic discoveries ranging from Bose–Einstein condensation to the quantum control of single atoms1. Of particular interest, because they can be used in the quantum control of one atom by another, are excited Rydberg states2, 3, 4, where wavefunctions are expanded from their ground-state extents of less than 0.1 nm to several nanometres and even beyond; this allows atoms far enough apart to be non-interacting in their ground states to strongly interact in their excited states. For eventual application of such states5, a solid-state implementation is very desirable. Here we demonstrate the coherent control of impurity wavefunctions in the most ubiquitous donor in a semiconductor, namely phosphorus-doped silicon. In our experiments, we use a free-electron laser to stimulate and observe photon echoes6, 7, the orbital analogue of the Hahn spin echo8, and Rabi oscillations familiar from magnetic resonance spectroscopy. As well as extending atomic physicists’ explorations1, 2, 3, 9 of quantum phenomena to the solid state, our work adds coherent terahertz radiation, as a particularly precise regulator of orbitals in solids, to the list of controls, such as pressure and chemical composition, already familiar to materials scientists10.