• An electron-impact ion source based on photoelectron emission was developed for ionization of gases at pressures below 1e-4 mbar in an axial magnetic field in the order of 5 T. The ion source applies only DC fields, which makes it suitable for use in the presence of equipment sensitive to radio-frequency (RF) fields. The ion source was succesfully tested under varying conditions regarding pressure, magnetic field and magnetic-field gradient, and the results were studied with the help of simulations. The processes in the ion source are well understood and possibilities for further optimization of generated ion currents are clarified.