BG Chap 9 - The worshippers of demigods

Some persons, knowing the three Vedas, worship the Supreme Lord indirectly thru sacrifice, drinking the soma juice and becoming purified, pray for the heavenly planets. They attain the planet of Indra, where they enjoy godly delights. They are dedicated to the activities described in the Vedas. Though they do not know that the forms of Indra and other devatās are the forms of Kṛṣṇa alone, they actually worship Kṛṣṇa indirectly, situated in those respective forms by sacrifices prescribed in the three Vedas. Drinking the remnants of sacrifice, soma, and being purified of sins, they pray for Svarga. The enjoyment they obtain is actually given by Kṛṣṇa alone.

Having enjoyed the vast heavenly pleasures and exhausting their merit, they return to this mortal planet again. Following the Vedic rites and desiring objects of enjoyment, they take repeated birth and death. They attain births as brāhmaṇas and others on this earth. Again performing the duties enjoined in the three Vedas, they crave for heavenly enjoyment, and thus obtain repeated birth and death.