Just moments before the anticipated clash with the army of Judah, a dramatic reversal unfolded within the enemy camp. The formidable coalition that had gathered to fight the Israelites suddenly collapsed inward. God orchestrated the events so that the invading nations turned their weapons against one another, ensuring their mutual and complete destruction without a single survivor [רש״י].
The chaos began when the forces of Ammon and Moab turned against the Edomites, intending to wipe them out completely. Commentators offer different explanations for this sudden internal betrayal. It is possible that Ammon and Moab suspected the Edomites of treason, given Edom's history of submission to the kingdom of Judah [ביאור שטיינזלץ]. Alternatively, the attack may have been the result of mistaken identity; in the confusion of the camp, Ammon and Moab believed the Edomites were actually setting an ambush against them [מצודת דוד].
Once the Edomite forces were entirely eliminated, Ammon and Moab turned their hostility toward each other. What began as an alliance ended in a tragic irony where mutual support transformed into utter ruin. This phase of the conflict is viewed by some as a chain reaction of uncontrolled violence: one warrior stepped in to help a friend kill an attacker, only to be killed by another, creating an endless cycle of bloodshed until everyone was dead [מצודת דוד]. Others suggest that this mutual destruction was fueled by old rivalries resurfacing [ביאור שטיינזלץ], or perhaps a calculated betrayal by Moab, who seized the opportunity to destroy Ammon while they were weakened from the prior battle with Edom [מלבי״ם].
To fully grasp the scale and cause of this madness, the true composition of the enemy army must be understood. Under normal circumstances, Ammon, Moab, and Edom were subjugated by the Israelites and would not have posed a threat terrifying enough to strike fear into Judah. However, this was a massive military alliance seeking to break free from domination. They had hired numerous mercenary battalions from Aram across the sea and allied with additional nations, including the Philistines, Assyrians, and Hagrites. In the ensuing panic, each faction attempted to assist its specific allies. Yet, the sheer number of different camps and battalions created overwhelming confusion. Blinded by the chaos, the soldiers struck out at one another until the entire camp was left in ruins [מלבי״ם, רש״י].