The main functions of a dharmapāla are said to be to avert the inner and outer obstacles that prevent spiritual practitioners from attaining spiritual realizations, as well as to foster the necessary conditions for their practice.