Deuteronomy 28:52
And he shall besiege thee in all thy gates, until thy high and fenced walls come down, wherein thou trustedst, throughout all thy land: and he shall besiege thee in all thy gates throughout all thy land, which the LORD thy God hath given thee.
The warning is that an enemy would besiege Israel in all its gates throughout all the land until the high and fenced walls in which the people trusted came down. It belongs to the curses and threatened consequences for disobedience and forsaking God's commandments, set in contrast to the blessings promised for obedience, warning that disobedience brings calamity and adversity. It foretells the destruction of Jerusalem by the Roman armies under Titus, whose siege surrounded the gates, brought down the trusted fortifications, laid waste the land, and brought terrible suffering and devastation.
The chapter shows that God's promises to Israel are upon condition of obedience. Disobedience brings an altering of God's purpose toward His people, with obedience bringing life and disobedience bringing judgment. Read together with Deuteronomy 1, the chapter explains why the adults of the army that left Egypt were refused entrance into the promised land. God sent prosperity or adversity according to whether Israel obeyed or transgressed His law, the law contained in the ark.
The verse belongs to the directions in Deuteronomy 26, 27 and 28 that state plainly the blessings of obedience and are to be read carefully, expressing the principles of the law of God's kingdom made specific so that minds are not left in ignorance and uncertainty. The verse belongs to a call to read Deuteronomy 7, 8 and 28 with Exodus 15:26, showing that disease of every kind comes because human beings transgress God's law, that Israel broke down the barriers God in His providence had erected to preserve them from disease, and that God gave those barriers so His people might live in health and holiness and learn obedience. These scriptures present the never-ceasing obligation of all whom God has blessed with life and health and temporal and spiritual advantages, and the message has not grown weak with age but God's claims are just as binding now and just as fresh in importance as His gifts are fresh and continual.