1 When Athaliah the mother of Ahaziah saw that her son was dead, she arose and destroyed all the royal heirs.

2 But Jehosheba, the daughter of King Joram, sister of Ahaziah, took Joash the son of Ahaziah, and stole him away from among the king's sons who were being murdered; and they hid him and his nurse in the bedroom, from Athaliah, so that he was not killed.

3 So he was hidden with her in the house of the LORD for six years, while Athaliah reigned over the land.

4 In the seventh year Jehoiada sent and brought the captains of hundreds--of the bodyguards and the escorts--and brought them into the house of the LORD to him. And he made a covenant with them and took an oath from them in the house of the LORD, and showed them the king's son.

5 Then he commanded them, saying, "This is what you shall do: One-third of you who come on duty on the Sabbath shall be keeping watch over the king's house,

6 one-third shall be at the gate of Sur, and one-third at the gate behind the escorts. You shall keep the watch of the house, lest it be broken down.

7 The two contingents of you who go off duty on the Sabbath shall keep the watch of the house of the LORD for the king.

8 But you shall surround the king on all sides, every man with his weapons in his hand; and whoever comes within range, let him be put to death. You are to be with the king as he goes out and as he comes in."

9 So the captains of the hundreds did according to all that Jehoiada the priest commanded. Each of them took his men who were to be on duty on the Sabbath, with those who were going off duty on the Sabbath, and came to Jehoiada the priest.

10 And the priest gave the captains of hundreds the spears and shields which had belonged to King David, that were in the temple of the LORD.

11 Then the escorts stood, every man with his weapons in his hand, all around the king, from the right side of the temple to the left side of the temple, by the altar and the house.

12 And he brought out the king's son, put the crown on him, and gave him the Testimony; they made him king and anointed him, and they clapped their hands and said, "Long live the king!"

13 Now when Athaliah heard the noise of the escorts and the people, she came to the people in the temple of the LORD.

14 When she looked, there was the king standing by a pillar according to custom; and the leaders and the trumpeters were by the king. All the people of the land were rejoicing and blowing trumpets. So Athaliah tore her clothes and cried out, "Treason! Treason!"

15 And Jehoiada the priest commanded the captains of the hundreds, the officers of the army, and said to them, "Take her outside under guard, and slay with the sword whoever follows her." For the priest had said, "Do not let her be killed in the house of the LORD."

16 So they seized her; and she went by way of the horses' entrance into the king's house, and there she was killed.

17 Then Jehoiada made a covenant between the LORD, the king, and the people, that they should be the LORD's people, and also between the king and the people.

18 And all the people of the land went to the temple of Baal, and tore it down. They thoroughly broke in pieces its altars and images, and killed Mattan the priest of Baal before the altars. And the priest appointed officers over the house of the LORD.

19 Then he took the captains of hundreds, the bodyguards, the escorts, and all the people of the land; and they brought the king down from the house of the LORD, and went by way of the gate of the escorts to the king's house. Then he sat on the throne of the kings.

20 So all the people of the land rejoiced; and the city was quiet, for they had slain Athaliah with the sword in the king's house.

21 Jehoash was seven years old when he became king.