The Davidic dynasty in the Kingdom of Judah usually enjoyed political stability, but this security crumbled during the reign of Amaziah. Much like his father Joash, Amaziah ultimately met his end at the hands of internal rebels [ביאור שטיינזלץ]. The king's severed connection with God directly caused him to lose the loyalty and affection of his people. The primary motive driving this rebellion was the deep pain and anger felt by the citizens of Jerusalem, who mourned the loss of their sons and relatives in an unnecessary war that Amaziah had provoked against the Kingdom of Israel [רש"י]. Some suggest that the priests of God were the ones who spearheaded the uprising against him [מלבי"ם]. The commentators agree that the plot against the king began the very moment he turned away from God's path.
Upon discovering the conspiracy forming against him, Amaziah was forced to flee for his life. He escaped to Lachish, a heavily protected fortress city belonging to the kings of Judah [רש"י, רלב"ג, ביאור שטיינזלץ]. In this stronghold, he managed to gather supporters and secure his position for an extended period [מלבי"ם]. This created a complex political situation, leaving a leadership void in Jerusalem for the fifteen years the king lived in exile.
There are differing views regarding who actually controlled Jerusalem during Amaziah's long absence. One approach suggests that the moment Amaziah fled, the people of Judah crowned his son Azariah, also known as Uzziah, who effectively ruled the kingdom while his father remained in exile [רלב"ג, מלבי"ם]. However, another perspective rejects this idea, pointing out that Uzziah was merely a year old at the time of his father's escape. According to this view, it was actually Uzziah's mother, Jecoliah, who held practical power and governed during those years [רש"י].
Despite the passage of time, the conspirators in Jerusalem eventually grew powerful enough to finish what they had started. After many years, the rebels dispatched assassins to the fortress of Lachish, where they found the exiled king and put him to death [ביאור שטיינזלץ, מלבי"ם].