A distributed feedback semiconductor laser provided with a grating which effects optical feedback by means of periodic corrugation disposed inside an optical resonator. The optical resonator has at least two regions having different Bragg wavelengths, and these regions are arranged longitudinally in the direction of an optical axis. The laser device can realize stable single longitudinal mode oscillation through variation of the refractive indexes of the regions nonuniformly around an average value.