Bhagavad Gita 17.4

यजन्ते सात्त्विका देवान्यक्षरक्षांसि राजसाः।प्रेतान्भूतगणांश्चान्ये यजन्ते तामसा जनाः ॥१७.४॥

yajante sāttvikā devānyakṣarakṣāṃsi rājasāḥpretānbhūtagaṇāṃścānye yajante tāmasā janāḥ

The sattvic, or pure, men worship the gods; the rajasic, or passionate, worship the yakshas and rakshasas; the others, the tamasic or deluded people, worship ghosts and hosts of nature-spirits.

गीता