We show that an electronic servo loop can be closed stably and accurately on a fiber-optic gyroscope by using the phase-modulation technique. Using a closed-loop fiber-optic gyroscope with gated two-harmonic phase modulation, an experiment on the linearity was performed; a linearity of approximately 0.5% was achieved below 90 degrees /sec. The parameter dependencies of the linearity are discussed and theoretical and experimental results given.