Athaliah killed the royal family so she could be queen, but Joash was rescued by his aunt and hidden in the temple. After six years, Jehoiada the priest crowned Joash as king and had Athaliah executed. King Joash repaired the temple and did what was right as long as Jehoiada lived. When Jehoiada died, Joash turned to idolatry and was judged by God.