The model first introduced by Raga & Canto in which astrophysical jets are
deflected on passing through an isothermal high-density region is generaliz
ed by taking into account gravitational effects on the motion of the jet as
it crosses the high-density cloud. The problem is also generalized for rel
ativistic jets in which gravitational effects induced by the cloud are negl
ected. Two further cases, classical and relativistic, are discussed for the
cases in which the jet is deflected on passing through the interstellar ga
s of a galaxy in which a dark matter halo dominates the gravitational poten
tial. The criteria for the stability of jets due to the formation of intern
al shocks are also discussed.