Śrīmad-Bhāgavatam · Text 9.14.6
Who is speaking and story frame
शुक्रो बृहस्पतेर्द्वेषादग्रहीत् सासुरोडुपम् ।
हरो गुरुसुतं स्नेहात् सर्वभूतगणावृत: ॥ ६ ॥
śukro bṛhaspater dveṣād
agrahīt sāsuroḍupam
haro guru-sutaṁ snehāt
sarva-bhūta-gaṇāvṛtaḥ
Because of enmity between Bṛhaspati and Śukra, Śukra took the side of the moon-god and was joined by the demons. But Lord Śiva, because of affection for the son of his spiritual master, joined the side of Bṛhaspati and was accompanied by all the ghosts and hobgoblins.
Read Śrīla Prabhupāda's purport on Vedabase.io