We report on the first realization of an all-optical frequency-by-three divider. The frequency to be divided is generated by a single-frequency diode master-oscillator power-amplifier (MOPA) system emitting at a wavelength of 812 nm. By-three-division is achieved with a continuous-wave (CW) optical parametric oscillator (OPO) based on a periodically pulsed LiNbO3 crystal, which carries tow sections with different poling periods. The first section provides quasi-phase matching (QPM) for parametric oscillation at 1218 nm and 2436 nm such that the idler frequency is approximately one-third of the pump frequency. The other section provides QPM for second harmonic generation (SHG) of the idler frequency which gives an additional field at a wavelength of 1218 nm. By fine tuning the OPO output wavelengths, the frequency difference between the signal and the idler-SHG is brought close to zero. This results in a mutual injection-locking of the idler and signal waves, giving phase-coherent oscillator of both waves with the pump at a frequency ratio of exactly 1 to 2 to 3. The measured locking-range of 0.5 to 1 MHz shows good agreement with the theoretical value of 0.8 MHz obtained form numerically solving the coupled wave equations for the OPO with resonator internal idler-SHG.