yajante sāttvikā devān
yakṣa-rakṣāḿsi rājasāḥ
pretān bhūta-gaṇāḿś cānye
yajante tāmasā janāḥ
Translation
Men in the mode of goodness worship the demigods; those in the mode of passion worship the demons; and those in the mode of ignorance worship ghosts and spirits.