Transformation of the angular spectrum of radiation having passed through a spatially inhomogeneous amplifying medium is studied. Conditions allowing an efficient increase of the medium length up to the value, at which the beam divergence is minimum, are formulated. It is shown that the angular spectrum of radiation in a nonlinear amplifying medium is quite a controllable parameter.