A gas knife configured to dry a surface in an immersion lithographic apparatus is optimized to remove liquid by ensuring that a pressure gradient is built up in the liquid film on the surface being dried.