2 Kings 22:19
Because thine heart was tender, and thou hast humbled thyself before the LORD, when thou heardest what I spake against this place, and against the inhabitants thereof, that they should become a desolation and a curse, and hast rent thy clothes, and wept before me; I also have heard thee, saith the LORD.
As Josiah responded, the nation was nearing the limit of divine forbearance and its punishment was imminent. When he heard that Jerusalem and Judah and its inhabitants would become a desolation and a curse, his heart was tender and humble before the Lord. His humility was both inward and outward, for he grieved in deep sorrow, tore his clothes, wept, and bowed before God.
He promptly sought God for forgiveness, mercy, and pardon for the sins of an impenitent nation. Because of his tender, humbled response, the Lord heard and acknowledged him. God promised that Josiah would die in peace without seeing the coming calamity in his lifetime, though the announced ruin of the city could not be averted or changed by him.