We present a scheme for locking optical cavities with arbitrary detuning by many linewidths from resonance using an electro-optic modulator that can provide arbitrary ratios of amplitude-to-phase modulation. We demonstrate our scheme on a Fabry–Perot cavity, and show that a well-behaved linear error signal can be obtained by demodulating the reflected light from a cavity that is detuned by several linewidths.National Science Foundation (U.S.) (PHY-0757058