In a radiation therapy and magnetic resonance unit, a magnetic resonance diagnosis part is provided. A radiation therapy part is provided for irradiation of an irradiation area within an interior of the diagnosis part. The radiation therapy part comprises a beam deflection enclosure for deflecting an electron beam toward an axis of the diagnosis part from an initial trajectory parallel to the axis. The beam deflection enclosure comprises a first magnetic field in a region of the beam deflection enclosure but of opposite direction and effective to cancel a main magnet field of the diagnosis part. A second magnet field is directed perpendicular to a trajectory of the electron beam to cause the electron beam to be deflected inward towards the axis.