The psalm opens with a courtroom scene: God has taken his place in the divine council; in the midst of the gods he holds judgment. Then he addresses them with a question that is an accusation: how long will you judge unjustly and show partiality to the wicked?
Verses 3 and 4 give the command. Give justice to the weak and the fatherless, maintain the right of the afflicted and the destitute. Rescue the weak and the needy; deliver them from the hand of the wicked. It is the standard of justice God demands of anyone who has power.
Verses 5 to 7 describe the response of the accused and the sentence. They have neither knowledge nor understanding, they walk about in darkness, and therefore all the foundations of the earth are shaken. God says he called them gods and sons of the Most High, but they shall die like men and fall like any prince.
Verse 8 is the psalmist's closing prayer: arise, O God, judge the earth, for you shall inherit all the nations.