Intertwining operators and residues. II. Invariant distributions