וַתַּעַבְר֣וּ אֶת־הַיַּרְדֵּן֮ וַתָּבֹ֣אוּ אֶל־יְרִיחוֹ֒ וַיִּלָּחֲמ֣וּ בָכֶ֣ם בַּעֲלֵֽי־יְ֠רִיחוֹ הָֽאֱמֹרִ֨י וְהַפְּרִזִּ֜י וְהַֽכְּנַעֲנִ֗י וְהַֽחִתִּי֙ וְהַגִּרְגָּשִׁ֔י הַֽחִוִּ֖י וְהַיְבוּסִ֑י וָאֶתֵּ֥ן אוֹתָ֖ם בְּיֶדְכֶֽם׃
你們過了約旦河,來到耶利哥;耶利哥的居民,就是亞摩利人、比利洗人、迦南人、赫人、革迦撒人、希未人和耶布斯人,都與你們爭戰;我將他們交在你們手中。
Rashi
The people of Yericho went to war against you. As did the Emorites, the Perezites etc.5Why were these nations involved in the battle of Yericho? All these seven nations are mentioned here because Yericho is on the border, and was the bolt and lock of Eretz Yisroel. Therefore, all these seven nations were gathered there, represented by their elite soldiers.