Among other things, an accelerator (502) is mounted on a gantry (504) to enable the accelerator to move through a range of positions around a patient (506) on a patient support. The accelerator is configured to produce a proton or ion beam having an energy level sufficient to reach any arbitrary target in the patient from positions within the range. The proton or ion beam passes essentially directly from the accelerator to the patient. In some examples, the synchrocyclotron has a superconducting electromagnetic structure that generates a field strength of at least 6 Tesla, produces a beam of particles having an energy level of at least 150 MeV, has a volume no larger than 4.5 cubic meters, and has a weight less than 30 Tons.