And so David realized that the Lord had established him as king of Israel and was making his kingdom prosperous for the sake of his people.