The invention provides for a medical instrument (400, 500, 600, 700) comprising a magnetic resonance imaging system (404) and an external beam radiotherapy system (402) for irradiating a target zone (438) of a subject with a beam (442) of ionizing radiation within the imaging zone. The medical instrument further comprises a processor (448) for controlling the medical instrument. Execution of instructions cause the processor to: acquire (100, 200) first magnetic resonance data (458); reconstruct (102, 202) a first magnetic resonance image (460) from the first magnetic resonance data; receive (104, 204) planning data (462), wherein the planning data specifies a spatially dependent radiation dose for the target zone; register (106, 206) the planning data to the first magnetic resonance image; and calculate (108, 208) an external beam dosage plan (468) and a brachytherapy dosage plan (468) using the spatially dependent radiation dose and the first magnetic resonance image.