Psalms 7:9 Cause the evil of the wicked to come to an end, but make the righteous permanent. The one who tests the thoughts and emotions is a righteous God.
What the psalmist is praying for is the victory of righteousness over evil. The victory is not gained by the mere separation of the two groups for eternity. No, God’s righteousness must win, and the devil’s unrighteousness must lose. Only one is going to be permanent. The loser comes to an end: evil must die.