Bhagavad-gītā As It Is · Text 17.4
Faith shaped by the three guṇas
यजन्ते सात्त्विका देवान्यक्षरक्षांसि राजसा: ।
प्रेतान्भूतगणांश्चान्ये यजन्ते तामसा जना: ॥ ४ ॥
yajante sāttvikā devān
yakṣa-rakṣāṁsi rājasāḥ
pretān bhūta-gaṇāṁś cānye
yajante tāmasā janāḥ
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.
Read Śrīla Prabhupāda's purport on Vedabase.io