Efficient suppression of the relaxation oscillations in the output signal from an overdriven gain-switched laser diode is demonstrated for the first time by spectral filtering using a nonuniformly strained fibre Bragg grating. As a result, a five-fold increase in the peak power is achieved for the tail-free operation.