Lev. 20:24b "I am Jehovah your God who has separated you from among the peoples."
The story of the OT is largely the story of God attempting to have a relationship with the people of Israel. To that end, God freed the Children of Israel from slavery in Egypt and led them with power to the Promised Land. "I am Jehovah your God who has brought you out of the land of Egypt" (Lev. 19:36 AND 26:13 among many others). He freed them because He wanted them to be His people. Ex. 6:7 "And I will take you to me for a people and I will be unto you a God." God also wanted this to be a relationship closer than merely Master/servant. He describes His intents in terms of close friendship and uses imagery from the Garden to get the point across: "And I will walk among you and be your God and you shall be my people." (Lev. 26:12). The references to this relationship between God and Israel continue throughout the OT: 2 Sam. 7:8, 1 Kings 6:13, Ps. 50:7 etc, etc.
There was one slight hitch in these plans, however. God is a Holy God (Lev. 11:45), and His chosen people were not. As God could not become less than holy, nor could He remain holy if He closely associated with the unholy, God emphasized the need for His people to become holy and lead holy lives.
Ex. 22:31 "And you shall be holy men unto me, therefore . . ."
Lev_19:2 "Speak unto all the congregation of the children of Israel, and say unto them, Ye shall be holy; for I Jehovah your God am holy."
This is what God meant when He said He had separated them from the peoples. To be holy is to be set apart; to be designated for a special, specific use. As God instructed Moses in how to build the Tabernacle, He repeatedly stated that the articles of the Tabernacle were "Holy to the Lord" (Ex. 28:36, 31:15, 39:30). Those things were only to be used in the service of God. In like manner, the people were to be holy and to live only for Jehovah, not for any lesser God or lesser purpose. They were to learn to make a distinction between the holy and unholy, the clean and the unclean (Lev. 10:10, 20:25). They were to keep themselves apart from the nations surrounding them (Ex. 34:11-16). God had separated them from among the nations to have a relationship with them and they were to maintain that holy status in order to sustain that association.
All of this is instructive to us as members of the Kingdom of Heaven. As God separated the Children of Israel from the nations, so we have been called out from among them (Rom. 1:6). We are to be Holy, as He is (1 Pet. 1:15, 2:9). We are His, and can only maintain that closeness if we remain separate from the world (Col. 3:12, 1 Cor. 3:23; James 4:4). The Children of Israel failed to remain separate from the world and lost their relationship with God. We are heirs to a better salvation and a closer relationship, but we, too, can lose that if we don't maintain our holiness. We should learn from Israel's mistakes so as not to earn their fate, but instead, to one day be glorified with Him as His called out people.
2 Cor. 6:16 " . . . for we are a temple of the living God; even as God said, I will dwell in them, and walk in them; and I will be their God, and they shall be my people."