Unit 1 (v. 8a): Yahweh as judge over all peoples
The line states a general truth: Yahweh administers judgment broadly, not only within Israel but “to the peoples.” This frames the request that follows by placing the speaker’s case inside a larger picture of God’s worldwide rule and oversight.
Unit 2 (v. 8b): A personal request for a verdict
Because Yahweh judges, the speaker asks, “Judge me, Yahweh,” and ties the hoped-for outcome to the speaker’s “righteousness” and “integrity.” The speaker is not merely asking for help but for an evaluation that matches what the speaker claims is true about their conduct and loyalty.
Unit 3 (v. 9a–b): Ending wickedness; securing the righteous
The prayer expands from “me” to the whole moral landscape: the speaker asks that “the wickedness of the wicked” would reach its end, while the righteous would be established—made stable and able to stand. The logic pairs restraint of harm with support for those who live rightly.
Unit 4 (v. 9c): God’s ability to examine what is hidden
The final line gives the reason this kind of judgment can be trusted: God searches “minds and hearts.” The poet’s confidence depends on God seeing beyond appearances into motives and inner commitments, so that the verdict addresses what is truly going on.