Srimad Bhagavatam Canto 10, Chapter 63, Text 27

SB 10.63.27

nana-bhavair lilayaivopapannair
 devan sadhun loka-setun bibharsi
hamsy unmargan himsaya vartamanan
 janmaitat te bhara-haraya bhumeh
 
Translation: 
 
With various intentions, You perform pastimes to maintain the demigods, the saintly persons and the codes of religion for this world. By these pastimes You also kill those who stray from the right path and live by violence. Indeed, your present incarnation is meant to relieve the earth’s burden.
 
Purport: 
 
As Lord Krsna states in the Bhagavad-gita (9.29):
 
samo ’ham sarva-bhutesu
 na me dvesyo ’sti na priyah
ye bhajanti tu mam bhaktya
 mayi te tesu capy aham
 
“I envy no one, nor am I partial to anyone. I am equal to all. But whoever renders service unto Me in devotion is a friend — is in Me — and I am also a friend to him.”
 
The demigods and sages (devan sadhun) are dedicated to executing the will of the Supreme Lord. The demigods act as cosmic administrators, and the sages, by their teachings and their good example, illumine the path of self-realization and holiness. But those who transgress the natural law, the law of God, and live by committing violence against others are vanquished by the Supreme Lord in His various pastime incarnations. As the Lord states in the Bhagavad-gita (4.11), ye yatha mam prapadyante tams tathaiva bhajamy aham. He is impartial, but He responds appropriately to the actions of the living beings.
Srimad Bhagavatam Canto 10, Chapter 63, Text 26
Srimad Bhagavatam Canto 10, Chapter 63, Text 28