A lithographic apparatus that includes an exposure system and a measurement system, is presented. The exposure system projects a patterned beam onto a target portion of a first substrate, while the measurement system projects a measurement beam on a target portion of a second substrate. Movement of a movable part of the apparatus generates a disturbance in a position of another movable part of the apparatus, e.g. due to displacement of air. This error can be compensated by calculating a compensation signal which is a function of states of one or both of the movable parts.