A system and a method improve a quality of beam delivery in proton therapy by pencil beam scanning of a predeterminable volume within a patient that minimizes beam position errors. The system has a proton source generating a proton beam, a number of proton beam bending/focusing units, a beam nozzle having an outlet for the proton beam to penetrate the predetermined volume, a beam bending magnet, and a couple of sweeper magnets to sweep the proton beam in both lateral directions. A position-sensitive detector is aligned with the nozzle to control the position of the proton beam and control logic controls the position and the energy of the proton beam and has a beam steering data set. A correction logic is aligned with the control logic for correcting beam position errors by comparing an expected beam position with the actual beam position detected and generates beam position correction data.