An optical fiber amplifier features an optical amplifying section for
amplifying an inputted optical signal. A sampling section is provided for
shunting part of the optical signal amplified by the optical amplifying
section and detecting a first test light belonging to a short wavelength
band and a second test light belonging to a long wavelength band. An
input power control circuit serves to compare respective powers of the
first and second test lights and then outputs a control signal for
controlling an input power of the optical signal inputted to the optical
amplifying section according to the power differential of the first and
second test lights. An output power control circuit derives an output
power of the optical amplifying section from the power of the optical
signal shunted at the sampling section and also controls the optical
amplifying section so that the output power of the optical amplifying
section attains a predetermined value. A variable attenuator controls the
power of the optical signal inputted to the optical amplifying section
according to the control signal.