The X, Y and Rz positions of a mask stage are measured using two optical encoder-reading heads measuring displacements of respective grid gratings mounted on the mask stage. The grid gratings are preferably provided on cut-away portions of the mask table so as to be coplanar with the pattern on the mask itself. Measurements of the table position in the other degrees of freedom can be measured with capacitive or optical height sensors.