Deuteronomy 32:31

For their rock is not as our Rock, even our enemies themselves being judges.

The verse belongs to a song that recounts God's dealings with Israel and looks forward to future events. That forward look includes the final victory of the faithful when Christ returns in power and glory. Within the song the verse sets their rock against Israel's Rock, the Lord. Their rock is the false and powerless gods trusted and followed by Israel's enemies.

Even the enemies themselves are judges and witnesses by their own experience that their rock is not like the true Rock. Their own judgment confirms the difference, and their own defeat shows it. Unlike the false rock, God is perfect in work and just and true in all His ways. No enemy power or security compares to Him.

Israel's defeat, scattering, and being given over by the Lord came because the people abandoned Him and turned to other gods. It was His judgment upon them for turning from Him, not proof that the enemy gods overcame Him or were stronger than God. Forgetting God and turning to other gods is rebellion that brings His displeasure. Trusting powerless gods exposes the folly of such trust.

The surrounding prophecy reveals God's love for His people together with His abhorrence of sin. It warns of swift judgment on those who persist in rebellion. The outcome in defeat shows that Israel's God has delivered His people into the hand of the enemy, so that even enemies can recognize the difference between their rock and the Lord.