We have employed radio-frequency trapping to localize a single 40Ca+-ion in a high-finesse optical cavity. By means of laser Doppler cooling, the position spread of the ion's wavefunction along the cavity axis was reduced to 42 nm, a fraction of the resonance wavelength of ionized calcium (λ = 397 nm). By controlling the position of the ion in the optical field, continuous and completely deterministic coupling of ion and field was realized. The precise three-dimensional location of the ion in the cavity was measured by observing the fluorescent light emitted upon excitation in the cavity field. The single-ion system is ideally suited to implement cavity quantum electrodynamics under cw conditions. To this end we operate the cavity on the D3/2–P1/2 transition of 40Ca+ (λ = 866 nm). Applications include the controlled generation of single-photon pulses with high efficiency and two-ion quantum gates