It is an objective of the present invention to provide a system and a method for improving the quality of beam delivery in a system for proton therapy by pencil beam scanning of a predeterminable volume within a patient that minimizes the extent of possible beam position errors to an extent medically acceptable.This objective is achieved according to the present invention by a system and a method for the delivery of proton therapy by pencil beam scanning of a predetermined volume within a patient, comprising:a) a proton source in order to generate a proton beam being adjustable with respect to the beam intensity and/or beam energy, i.e. by means of a degraderb) a number of proton beam bending and/or focusing unitsc) a beam nozzle having an outlet for the proton beam to penetrate the predetermined volume of the patientd) a beam bending magnet being disposed upstream of the nozzlee) a couple of sweeper magnets in order to sweep the proton beam in both lateral directionsf) a position-sensitive detector being aligned with the nozzle in order to control the position of the proton beam andg) a control logic for controlling the position and the energy of the proton beam comprising a beam steering data seth) a correction logic aligned with the control logic for correcting beam position errors by comparing an expected beam position with the actual beam position detected in the position-sensitive detector and generating beam position correction data in dependency of the comparison results.