In ancient Israel the Davidic dynasty lasted about four hundred years from the reign of David to the reign of Zedekiah with only one interruption. That interruption occurred about halfway through the dynasty and proves somewhat instructive.
Jehu, putting an end to Jehoram in the north, encountered an extra guest, Jehoram's nephew Ahaziah the king of Judah, and killed him as well (2 Chronicles 22:7-9). When Athaliah, Ahaziah's mother, found out about this, she killed all the other heirs to the throne and seized it for herself (2 Chronicles 22:10). Given that Athaliah's mother was the famous Jezebel, these actions do not come as much of a surprise. Athaliah actually missed one of the heirs, a mere toddler (2 Chronicles 22:11-12).
Athaliah's coup began a six year interregnum (2 Chronicles 22:12), and one of the only times that a woman reigned over the kingdom of Judah.
Then the high priest, Jehoiada, does a very brave thing. He organized his people and guarding the temple, anointed the heir Joash to be king in the courtyard of the temple (2 Chronicles 23:1-12). With this public announcement of an heir, the public came flocking to the temple to acclaim the new king (2 Chronicles 12:12). One suspects that they were not altogether happy with Athaliah's rule. Athaliah heard something afoot and came to see what is the commotion. Upon entering the temple and seeing what was happening, she shrieked: "Treason! Treason!" (2 Chronicles 23:13), which, of course, it was as were her actions six years previously.
Jehoiada orders her to be dragged out of the temple and then put to death (2 Chronicles 23:14-15). From the standpoint of the Davidic line, justice was served. In this life, justice usually does not come so cleanly or neatly even when the counter-coup sets things more or less right. Sometimes it takes a counter-coup or the intervention of ecclesiastical authorities to set things right. Often, however, we forget about the innocents massacred at the hands of usurpers, or the innocents who must toil in servitude to corrupt regimes.