Srimad-Bhagavatam: Canto 10 - Chapter 1 - Verse 16
Sanskrit:
दशास्यबाणयोस्तुष्ट: स्तुवतोर्वन्दिनोरिव ।ऐश्वर्यमतुलं दत्त्वा तत आप सुसङ्कटम् ॥ १६ ॥
ITRANS:
daśāsya-bāṇayos tuṣṭaḥstuvator vandinor ivaaiśvaryam atulaṁ dattvātata āpa su-saṅkaṭam
Translation:
He became pleased with ten-headed Rāvaṇa, and also with Bāṇa, when they each chanted his glories, like bards in a royal court. Lord Śiva then bestowed unprecedented power upon each of them, but in both cases he was consequently beset with great difficulty.
Purport:
Rāvaṇa worshiped Lord Śiva to gain power and then misused that power to uproot the lord’s residence, sacred Kailāsa-parvata. On Bāṇāsura’s request, Lord Śiva agreed to personally guard Bāṇa’s capital, and later he had to fight for Bāṇa against Śrī Kṛṣṇa and His sons.