Leviticus 26 serves as the covenant's blessings and warnings, much like the end of a treaty. It opens with the core of loyalty: no idols, keep Sabbaths, reverence the sanctuary. If you walk in my statutes, God promised rain in season, harvests lasting until the next sowing, peace in the land, and victory over enemies. The greatest blessing was relational: I will walk among you, and will be your God, and you will be my people.
The warnings describe a series of disciplines, each introduced by the words if you will not listen. Each stage was meant to lead Israel back. God said He would break the pride of their power and send drought, wild animals, war, and famine. Finally, Israel would be scattered among the nations, and the land would enjoy its neglected Sabbaths. Israel's later history, including exile to Babylon, shows these warnings were real (2 Chronicles 36:21).
The chapter ends with grace. If they confess their iniquity and humble their hearts, God says, then I will remember my covenant with Jacob, and with Isaac, and with Abraham. Even in exile He would not utterly reject them. In 2 Corinthians 6:16 Paul applies verse 12 to the church: God dwells among His people through Christ. The covenant God is both holy and faithful.