Within a study on the merits of a multichannel automatic gain control in hearing aids, the effect of frequency-selective amplification on the masked speech-reception threshold (SRT) for sentences is measured in conditions of seriously disturbing low-frequency noise, with the effect of wideband amplification as a reference. Speech and noise are both spectrally shaped according to the bisector line of the listener's dynamic-range of hearing, but with the noise in a single octave band (0.25-0.5 or 0.5-1 kHz) increased by 20 dB relative to this line. The increase of noise level is steady state in the first experiment, and time varying in the second experiment. Results for 12 normal-hearing and 12 hearing-impaired listeners indicate that, in both experiments, frequency-selective compression of the signal in the octave band with the 20-dB increase of noise is more beneficial than wideband compression. For the hearing-impaired group, wideband compression does not give any systematic change in intelligibility. Frequency-selective compression in steady-state conditions may, for both groups of listeners, give a decrease of masked SRT (relative to a condition without compression) of up to 4 dB for a compression factor of 100%. Roughly comparable effects are seen for frequency-selective compression in time-varying conditions. The superiority of frequency-selective over wideband compression is attributed to a more effective reduction of upward spread of masking.