This psalm is a description of the invasion of Jerusalem by Pompey. The invading army is foreshadowed by “the blast of the trumpet sounding slaughter and destruction.” Since the sound of destruction is in the holy city of Jerusalem, the writer is crushed by what he heard and becomes physically ill (8:5). The writer sees himself as one of the innocent (8:23) who are devout (8:34).
The writer knows the judgment of God are righteous, so Jerusalem must be worthy of punishment. He lists a series of crimes which provoked the Lord to anger. They sinned in secret underground places provoking the Lord to anger (8:9a), they committed incest (8:9b) and adultery (8:10a). They stole from the sanctuary (8:11, cf. Romans 2:21) and “walked on the place of sacrifice” by entering the Temple with all kinds of uncleanliness (menstrual blood) and defiling sacrifices as common meat (8:12). The writer says they “left no sin undone” and surpassed the Gentiles by profaning the holy places.

Because of this the Lord sent a “wavering spirit” on the people so that when the Gentiles came to the city they were unable to fight back (8:14-17). Like Isaiah 51:17-23, Israel once again will drink the wine of God’s wrath.
The Lord brought someone “from the end of the earth” to attack Jerusalem. The leaders of Jerusalem met Pompey as if he were the coming messiah. Like Psalm 118:25-26, the leaders welcomed him with joy and blessed him with peace (8:16). Like the coming one in Isaiah 40:3, the leaders made the paths smooth before him (8:17a) and threw open their gates when he arrived (8:17b). This could refer to the machinations of Hyrcanus and Aristobulus, rival Hasmoneans who thought Pompey might grant them control of Judah. Although some of Aristobulus’s party wanted to keep Pompey out, “others admitted Pompey’s army in, and delivered up both the city and the king’s palace to him” (Ant. 14.4). Pompey “captured the fortified towers and the wall of Jerusalem” (8:19). According to Josephus:
But there was nothing that affected the nation so much in the calamities they were then under, as that their holy place, which had been hitherto seen by none, should be laid open to strangers; for Pompey, and those that were about him, went into the temple itself, whither it was not lawful for any to enter but the high priest, and saw what was reposited therein, the candlestick with its lamps, and the table, and the pouring vessels, and the censers, all made entirely of gold, as also a great quantity of spices heaped together, with two thousand talents of sacred money. (Jewish War, 1.7.6).
The writer of Psalm of Solomon 8 believed this judgment was just (8:23-32). God is always right in his judgments, so if he allowed the Gentiles to overrun the Temple, then it must be a just judgment. The people had “stiffened their neck” and have therefore drank the cup of God’s wrath 8:14) just as they had when Babylon took the Temple five hundred years before (Isa 51:17-23). Despite the physical distress this invasion caused (8:1-5), the writer praises the Lord for his justice (8:33-34).
There are two things the writer asks from the Lord. First, to turn in mercy and be compassionate on Israel once again (8:27) by bringing together the dispersed of Israel. The Lexham LXX makes this more explicit: “Gather the diaspora of Israel with mercy and goodness.” Second, the writer asks God to no longer neglect (or better, despise) them lest the Gentiles devour the nation “as if there were no redeemer.” Here the writer declares his faith in God as the redeemer of Israel (8:30-31). The same verb is used in Psalms of Solomon 9:1, looking back to the Lord who redeemed Israel out of their slavery, in Isaiah 44:22-24 to describe a coming messianic figure and in Luke 24:21 disciples on the road to Emmaus thought Jesus might “be the one to redeem Israel.” This is another hint of a messianic figure in the Psalms of Solomon.

In verse 5, Wright translates θλίβω as “persecution in OTP, but the verb does not necessarily connote a religious or political persecution. For example, Paul used the verb in 2 Corinthians 4:8 to describe his own troubles. Sometimes he was persecuted by the Jews or the Romans, but the verb refers to all sorts of troubles he faced. It is tempting hear an echo of the troubles faced by Pharisees under Alexander Jannaeus. Jannaeus arrested 800 of his enemies, many of whom were Pharisees. He crucified these men while he banqueted with his wife and concubines, viewing the executions (Antiq. 13.410-15). Unfortunately there is nothing in the psalm which clearly echoes this event.
The target of the psalmist are the profane “who sit in the council of the devout” (v. 1). The writer uses the word βέβηλος to describe these people, a word used in the Pastoral Epistles for the “pointless and empty talk” of elderly women (1 Tim 4:7, Titus 1:9). Paul warns Timothy to avoid this kind of frivolous talk (1 Tim 6:20, 2 Tim 2:16). The psalmist says these people are “excessive in words, excessive in appearance above everyone else.” They are harsh in their “condemnation of sinners at judgment” (v. 2) and they destroy with “agitating words” (4:12). The psalmist thinks these profane people are trying to impress people with “deeds of ridicule and contempt” (4:7, 19).
But the description of the devout in this section does resonate with the New Testament. The author of this Psalm says the righteous person (δίκαιος) is not sinless. They stumble, but they know their salvation comes from the Lord. They are constantly looking for unintentional sins and fast in order to “atone for sins of ignorance.” Here the verb ἐξιλάσκομαι is used.