The more important reality is that her refusal to submit to Babylon was ultimately rebellion against the Lord (see Jeremiah 27:1–3) and so her pride was against the Lord and judgment came from him. Behold, I will bring terror upon you, declares the Lord of hosts, from all who are around you.
The phrase all who are around you
refers to surrounding nations (see Jeremiah 48:17,Jeremiah 48:39). It is possible that her neighbours took part in Babylon’s invasion, or it could also refer to the subsequent invasion of the Arab nations. The result will be that the people of Ammon will disintegrate and will be scattered to all corners with none to gather the fugitives.
The nation will cease to exist.
5 Behold, I will bring terror upon you, declares the Lord GOD of hosts, from all who are around you, and you shall be driven out, every man straight before him, with none to gather the fugitives.