An all-optical switch using a waveguide directional coupler with a nonlinear coupling medium is shown. At low input power, it performs as a linear directional coupler; but at higher input powers, the coupling length increases, thus reducing coupling. For coupling lengths near multiples of the linear coupling length, switching can occur from a crossed-over state at low power to a straight-through condition at higher input power. Theoretical analysis which describes the behavior is developed. A nonlinear coupler was fabricated which exhibited switching at 45.6 meV below the exciton resonance with a critical intensity of 3 x 10(4) W/cm2. Modeling of the device shows that n2 = 1.88 x 10(-8) cm2/W and alpha = 12.9 cm-1.