We present a theoretical investigation of stiction in nanoscale electromechanical contact switches. We develop a mathematical model to describe the deflection of a cantilever beam in response to both electrostatic and van der Waals forces. Particular focus is given to the question of whether adhesive van der Waals forces cause the cantilever to remain in the 'ON' state even when the electrostatic forces are removed. In contrast to previous studies, our theory accounts for deflections with large slopes (i.e. geometrically nonlinear). We solve the resulting equations numerically to study how a cantilever beam adheres to a rigid electrode: transitions between 'free', 'pinned' and 'clamped' states are shown to be discontinuous and to exhibit significant hysteresis. Our findings are compared to previous results from linearized models and the implications for nanoelectromechanical cantilever switch design are discussed. © 2013 IOP Publishing Ltd.