וַיִּשְׁלַ֣ח אֵלָ֣יו מַלְאָכִ֣ים ׀ לֵאמֹר֩ ׀ מַה־לִּ֨י וָלָ֜ךְ מֶ֣לֶךְ יְהוּדָ֗ה לֹא־עָלֶ֨יךָ אַתָּ֤ה הַיּוֹם֙ כִּ֚י אֶל־בֵּ֣ית מִלְחַמְתִּ֔י וֵאלֹהִ֖ים אָמַ֣ר לְבַֽהֲלֵ֑נִי חֲדַל־לְךָ֛ מֵאֱלֹהִ֥ים אֲשֶׁר־עִמִּ֖י וְאַל־יַשְׁחִיתֶֽךָ׃
Ngunit nagpadala si Neco sa kanya ng mga sugo upang sabihin: “Ano ang kinalaman ko sa iyo, hari ng Juda? Hindi ikaw ang aking sasalakayin ngayon, kundi ang lugar ng aking pakikidigma; at inutusan ako ng Diyos na magmadali. Tumigil ka sa pakikialam sa Diyos na kasama ko, upang hindi ka Niya lipulin.”
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]