Numbers 24:20

And when he looked on Amalek, he took up his parable, and said, Amalek was the first of the nations; but his latter end shall be that he perish for ever.

Amalek was once counted foremost among the nations. Yet the verse foretells that Amalek will ultimately perish forever in complete destruction. This prediction stood alongside Balaam's other foretold destructions of nations and left Moab's king with no hope. Amalek's end is part of the final destruction of God's enemies.