The mask in a lithographic apparatus is clamped on a first side using a first clamping device and on a second side, different from the first side, using a second clamping device. The clamping forces are preferably applied using thin membranes. The first clamp clamps the substrate in directions parallel to the plane of the patterning device, perpendicular to the plane of the patterning device and rotationally. The second clamping device clamps the patterning device only in directions parallel to the plane of the substrate.