Human history moves toward a climactic moment when God directly responds to the actions of humanity, gathering the world to reveal His justice. The primary approach among commentators is that God is intimately aware of the evil deeds and hidden thoughts of idolaters, observing them as if He were standing right beside them [מצודת דוד, צאינה וראינה]. These mounting actions reach a point where they compel God to intervene [רש״י, שד״ל]. Alternatively, this moment simply marks the arrival of the destined time for God to assemble the nations [רד״ק, אבן עזרא, מצודת דוד].
God orchestrates a massive convergence of all peoples, who are distinctly identified by their unique languages [מצודת ציון]. However, this global assembly is not a peaceful gathering. God actively shapes events by planting a plan in the hearts of these nations to unite and wage war against Jerusalem, an event known as the war of Gog and Magog [רד״ק, אבן עזרא, ביאור שטיינזלץ]. His ultimate purpose in bringing them together is to expose the emptiness of their false beliefs and show them the complete error of their idolatry [רש״י, מלבי״ם, שד״ל].
Upon gathering, the nations will witness God's glory through the execution of His justice. He will strike down the wicked, bringing strict judgment upon them so that the entire world will finally recognize His absolute unity [אבן עזרא, מצודת דוד, מלבי״ם, שד״ל]. Some connect this divine retribution to a devastating plague that will afflict the armies besieging Jerusalem [רש״י].
Alongside this global judgment lies a unique promise regarding the complete ingathering of the Israelites. God knows the hidden thoughts and true origins of those descendants of Israel who were forced to convert, assimilated, and entirely forgot their heritage. In the future, much like the plagues in Egypt, when God strikes the surrounding nations, these hidden Jews will be miraculously spared. Through their survival, their true identity will be brought to light, allowing them to return and fully reconnect with their people [אהבת יהונתן].