וַיִּשְׁלַ֣ח אֵלָ֣יו מַלְאָכִ֣ים ׀ לֵאמֹר֩ ׀ מַה־לִּ֨י וָלָ֜ךְ מֶ֣לֶךְ יְהוּדָ֗ה לֹא־עָלֶ֨יךָ אַתָּ֤ה הַיּוֹם֙ כִּ֚י אֶל־בֵּ֣ית מִלְחַמְתִּ֔י וֵאלֹהִ֖ים אָמַ֣ר לְבַֽהֲלֵ֑נִי חֲדַל־לְךָ֛ מֵאֱלֹהִ֥ים אֲשֶׁר־עִמִּ֖י וְאַל־יַשְׁחִיתֶֽךָ׃
느고가 요시야에게 사자를 보내어 가로되 유다 왕이여 내가 그대와 무슨 관계가 있느뇨 내가 오늘날 그대를 치려는 것이 아니요 나로 더불어 싸우는 족속을 치려는 것이라 하나님이 나를 명하사 속히 하라 하셨은즉 하나님이 나와 함께 계시니 그대는 하나님을 거스리지 말라 그대를 멸하실까 하노라 하나
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]