1 Kings 16:10

And Zimri went in and smote him, and killed him, in the twenty and seventh year of Asa king of Judah, and reigned in his stead.

This verse belongs to the history of the divided kingdoms of Judah and Israel, covering roughly eighty years from the revolt of the ten tribes to the death of Jehoshaphat and recording the reigns of kings in both kingdoms. It records one step in the succession of northern kings after the division under Rehoboam, when ten tribes stood in Israel and war continued between the two divisions. In the north Nadab and Baasha and Elah were followed by Zimri, who was followed by Omri and then Ahab, while Abijah and Asa reigned in Judah. The killing occurred in the twenty-seventh year of Asa king of Judah. The whole succession of these wicked kings of Israel fell within the one good reign of Asa, who came to the throne two years before the death of Jeroboam.

Elah's reign over Israel was drunken and lasted only two years, repeating the history of Nadab. His captain Zimri went in and struck and killed him while he was drunk, and took the throne in his place. Zimri destroyed all his house and brought the house of Baasha to an end with him, killing the rest of Baasha's family to eliminate rivals. This carries out the same end foretold for Baasha and his house as befell the house of Jeroboam. Zimri reigned in his stead for only seven days, or a week. Before that week ended the army declared Omri king and marched on the capital, and Omri succeeded him, as part of a period of violent struggles for Israel's throne.

After Omri defeated him, Zimri burned the palace and perished in the flames, killing himself. The verse is part of the account of Israel's apostasy under its kings, who led the people away from worship of the living God toward idolatry. That apostasy was a gradual going from bad to worse from Jeroboam who made Israel to sin. The verse belongs to the historical setting of the great apostasy in Israel in the days of Elijah. That was the time of the weak king Ahab and his wife Jezebel, whose Baal worship led Israel into idolatry and disobedience to God's commandments, which Elijah confronted.