Chapter 17 · The Three Kinds of Faith · Krishna said
Bhagavad Gita 17.4 — Whom each worships
यजन्ते सात्त्विका देवान्यक्षरक्षांसि राजसाः। प्रेतान्भूतगणांश्चान्ये यजन्ते तामसा जनाः ॥
yajante sāttvikā devānyakṣarakṣāṃsi rājasāḥ | pretānbhūtagaṇāṃścānye yajante tāmasā janāḥ ||
Meaning
Sattvic people worship the gods, rajasic people worship yakshas and rakshasas, and tamasic people worship ghosts and spirits.