Antimatter was first predicted in 1931, by Dirac. Work with high-energy antiparticles is now commonplace, and anti-electrons are used regularly in the medical technique of positron emission tomography scanning. Antihydrogen, the bound state of an antiproton and a positron, has been produced at low energies at CERN (the European Organization for Nuclear Research) since 2002. Antihydrogen is of interest for use in a precision test of nature's fundamental symmetries. The charge conjugation/parity/time reversal (CPT) theorem, a crucial part of the foundation of the standard model of elementary particles and interactions, demands that hydrogen and antihydrogen have the same spectrum. Given the current experimental precision of measurements on the hydrogen atom (about two parts in 1014 for the frequency of the 1s-to-2s transition), subjecting antihydrogen to rigorous spectroscopic examination would constitute a compelling, model-independent test of CPT. Antihydrogen could also be used to study the gravitational behaviour of antimatter. However, so far experiments have produced antihydrogen that is not confined, precluding detailed study of its structure. Here we demonstrate trapping of antihydrogen atoms. From the interaction of about 107 antiprotons and 7×108 positrons, we observed 38 annihilation events consistent with the controlled release of trapped antihydrogen from our magnetic trap; the measured background is 1.4+/-1.4 events. This result opens the door to precision measurements on anti-atoms, which can soon be subjected to the same techniques as developed for hydrogen.