Context. The dynamics of a self-gravitating gaseous subsystem of a disk galaxy is considered analytically, using a local WKB approximation in the radial direction. The simplified model of a galaxy is used in which stars (and a dark matter, if it exists at all) do not participate in the disk collective oscillations and just form a background charge. Aims. For the first time in galactic dynamics, an equation is derived to describe the torque that results from the buildup of gravitational Jeans-type instability of nonaxisymmetric gravity perturbations (e.g., those produced by a spontaneous disturbance or, in rare cases, a satellite system). Methods. The torque serves to redistribute the angular momentum of the inhomogeneous disk by growing (that is, unstable) nonaxisymmetric density waves in such a way that a fraction of the mass (eventually residing in the central parts) retains only a minor fraction of the angular momentum, most of the latter being deposited in extended outer regions of the system. Results. The outward transfer of angular momentum (and the "heating") bring the disk toward stability against all small perturbations, including the most unstable nonaxisymmetric ones.