1 Chronicles 14:2

And David perceived that the LORD had confirmed him king over Israel, for his kingdom was lifted up on high, because of his people Israel.

The verse belongs to the prosperous years of David's reign, in the part of Chronicles that parallels the last part of Samuel. That history of David in 1 and 2 Chronicles records the kingdom of Judah, while Kings deals more fully with the northern ten-tribe kingdom, with little said about the northern kingdom. Chronicles takes knowledge of Samuel and Kings for granted and supplies additional facts left out of those books. It is set among genealogies that preserve the records of God's people and the integrity of Israel's tribes. Judah's genealogy was carefully preserved because Christ came through that tribe.

David perceived that the Lord had established him as king over Israel and had raised up his kingdom on high. The political changes that brought him to the throne unfolded within God's purpose to make him king. God confirmed and lifted him up not for his own importance but because of His people Israel. The blessing and exaltation given to David were meant to benefit them. When David forgot that his gifts and ability to serve came from God, he made mistakes.