2 Chronicles 23:5

And a third part shall be at the king’s house; and a third part at the gate of the foundation: and all the people shall be in the courts of the house of the LORD.

The verse belongs to the account of Athaliah's usurpation and overthrow and of the restoration, establishment, and accession of Joash as king of Judah. Joash was still a baby when he was hidden in the temple by his aunt, the wife of Jehoiada the high priest, and kept there for six years. The verse describes the assigned divisions for that restoration, with a third at the king's house or palace and a third at the gate of the foundation to guard and protect the king, while all the people, or the rest, gather in the courts of the house of the Lord or temple.

When the people revolted, Athaliah was put to death and Joash was made king at seven years old. He did what was right while Jehoiada advised him. The surrounding passage in 2 Chronicles 23:4-8 contains an incidental allusion to the Sabbath.