Faced with a severe military threat, the king of Judah is forced to empty the treasuries of both the Temple and the royal palace to save his capital city. Jehoash gathers all the sacred items and gold, sending them as a massive bribe to Hazael, the king of Aram, in a desperate effort to prevent an attack [ביאור שטיינזלץ].
This drastic measure illustrates the destructive consequences of sin. Although Jehoash had previously earned merit through his efforts to gather and increase the sacred items in the Temple, his later wrongdoings canceled out his good deeds. As a direct result, he is forced to give away all the holy treasures he had carefully gathered, along with those saved by his ancestors, handing them directly to an enemy [מלבי״ם].
The bribe does achieve a temporary peace, as Hazael retreats and spares the city from immediate warfare [רד״ק, ביאור שטיינזלץ]. However, this relief is entirely short-lived. Some time later, Jehoash commits a grave sin by murdering the prophet Zechariah, who had openly rebuked the people. In response to this act, the Aramean army returns to attack Judah and Jerusalem. During this second invasion, the enemy forces kill the leaders of the people and leave Jehoash stricken with severe illness. Ultimately, Jehoash's own servants rebel against him and take his life, serving as the final punishment for shedding the blood of Zechariah [רד״ק].