In those days was Hezekiah sick unto death. And Isaiah the prophet the son of Amoz came unto him, and said unto him, Thus saith the LORD, Set thine house in order: for thou shalt die, and not live. Then Hezekiah turned his face toward the wall, and prayed unto the LORD, And said, Remember now, O LORD, I beseech thee, how I have walked before thee in truth and with a perfect heart, and have done that which is good in thy sight. And Hezekiah wept sore. Then came the word of the LORD to Isaiah, saying, Go, and say to Hezekiah, Thus saith the LORD, the God of David thy father, I have heard thy prayer, I have seen thy tears: behold, I will add unto thy days fifteen years. And I will deliver thee and this city out of the hand of the king of Assyria: and I will defend this city. And this shall be a sign unto thee from the LORD, that the LORD will do this thing that he hath spoken; Behold, I will bring again the shadow of the degrees, which is gone down in the sun dial of Ahaz, ten degrees backward. So the sun returned ten degrees, by which degrees it was gone down.
Chapter 38 does not follow chapter 37 chronologically because in verse 6. Hezekiah is promised deliverance from the Assyrian threat, whereas, at the end of the previous chapter, that threat had already ended. When Hezekiah had taken seriously ill, he earnestly prayed for lengthened life, and the God of David, his father, granted him fifteen more years. As a sign that he would recover and that Sennacherib would be repulsed, God promised to make the shadow on the sundial of Ahaz go ten degrees backward. Then, God miraculously caused the shadow to decline ten degrees while Hezekiah watched.