וַיִּשְׁלַ֣ח אֵלָ֣יו מַלְאָכִ֣ים ׀ לֵאמֹר֩ ׀ מַה־לִּ֨י וָלָ֜ךְ מֶ֣לֶךְ יְהוּדָ֗ה לֹא־עָלֶ֨יךָ אַתָּ֤ה הַיּוֹם֙ כִּ֚י אֶל־בֵּ֣ית מִלְחַמְתִּ֔י וֵאלֹהִ֖ים אָמַ֣ר לְבַֽהֲלֵ֑נִי חֲדַל־לְךָ֛ מֵאֱלֹהִ֥ים אֲשֶׁר־עִמִּ֖י וְאַל־יַשְׁחִיתֶֽךָ׃
Akan tetapi, Nekho mengirim utusan-utusan kepadanya untuk berkata: “Apa urusanku denganmu, hai raja Yehuda? Hari ini aku tidak datang untuk menyerangmu. Aku hendak menyerang kaum yang sedang berperang denganku, dan Allah telah menyuruh aku bergegas. Jangan menentang Allah yang menyertai aku, supaya Ia tidak membinasakanmu.”
From David to Destruction
Yoshiyahu HaMelech, entirely unnecessarily, enters into battle with Paroh Necho. Paroh Necho, according to the account in Divrei HaYamim II 35:21, even communicates to Yoshiyahu HaMelech that he is merely using Eretz Yisrael as a route to fight the Babylonians at the Battle of Carchemish. According to Chazal (Ta’anit 22b), Yirmiyahu Hanavi warns Yoshiyahu HaMelech against intervening.
Rashi
I will cause the sun to set at midday—When there will be exceeding tranquility, a sudden downfall will come and our Rabbis said: This refers to the day of Josiah who died by the “peaceful sword” as our Rabbis said: There was no more peaceful sword than Pharaoh-Neco who said to Josiah, (II Chron. 35:21) “What do I have to do with you, O king of Judah; not upon you yourself today.” Not upon you do I come today, but to pass through your land “to the house against which I wage war etc.” [from Mo’ed Katan, Ta’anith 22a]