Athaliah (the Queen mother) rules Judah until her grandson and rightful heir, Joash, comes out of hiding and is crowned by the priests, who then bring in major religious reforms: 2 Kings 11:1−3; 2 Chronicles 22:10−12; 2 Kings 11:4−12; 2 Chronicles 23:1−11; 2 Kings 11:13−16; 2 Chronicles 23:12−15; 2 Kings 11:17−21; 2 Chronicles 23:16−21; 2 Kings 12:1−16; 2 Chronicles 24:1−22; 2 Kings 10:32−36
The family relationships became quite complex: Athaliah, the granddaughter of an Israelite/Samarian king, was the mother of Ahaziah, king of Judah, who was related by marriage to Ahab. Ahaziah must have died without an heir, and it seems there must have been a power struggle, which appeared to end with his mother, Athaliah, killing the whole family (with no obvious thought of who her successor would be).
But Ahaziah’s sister, Jehosheba was married to the Temple priest, Jehoiada. She managed to save one child, Joash, who was hidden in the Temple until he was seven years old. Athaliah ruled Judah for those seven years. The text suggests something happened to force Jehoiada to act:
Chronicles 23:1-3In the seventh year of Athaliah’s reign, Jehoiada the priest decided to act. He summoned his courage and made a pact with five army commanders … Jehoiada said to them, ‘Here is the king’s son! The time has come for him to reign! The Lord has promised that a descendant of David will be our king.’
We’re not told anything of Athaliah’s reign, but she wasn’t popular. The coup succeeded with very little, if any, opposition:
Chronicles 23:11 Then Jehoiada and his sons brought out Joash, the king’s son, placed the crown on his head, and presented him with a copy of God’s laws. They anointed him and proclaimed him king, and everyone shouted, ‘Long live the king!’
She must have been in league with the temple of Baal and its priest. As religious reform swept across Judah, the people tore down the temple and killed its priest.
2 Kings 11:17-21Then Jehoiada made a covenant between the Lord and the king and the people that they would be the Lord’s people. He also made a covenant between the king and the people. And all the people of the land went over to the temple of Baal and tore it down.
And only then did the young king leave the Temple to take his seat on the throne of Judah. It was recorded as a happy event for everyone, not just the ruling elite:
2 Kings 11:20So all the people of the land rejoiced, and the city was peaceful because Athaliah had been killed at the king’s palace.