A counterpropagating quasi-phase-matched configuration is examined that is capable of efficiently producing second-order cascaded nonlinear phase shifts with minimal power lost to the second harmonic. For all-optical switching in a nonlinear Mach-Zehnder interferometer, the calculated minimum input power needed for switching (i.e., to yield a +/-pi/2 phase shift) is 40 times smaller than the power needed in the standard typeI copropagating configuration. The throughput of this counterpropagating device is 96% at the optimum switching point.