(Doctrine and Covenants | Section 103:24 - 26)
24 And inasmuch as mine enemies come against you to drive you from my goodly land, which I have consecrated to be the land of Zion, even from your own lands after these testimonies, which ye have brought before me against them, ye shall curse them;
25 And whomsoever ye curse, I will curse, and ye shall avenge me of mine enemies.
26 And my presence shall be with you even in avenging me of mine enemies, unto the third and fourth generation of them that hate me.
Compare:
(Old Testament | Deuteronomy 30:7)
7 And the LORD thy God will put all these curses upon thine enemies, and on them that hate thee, which persecuted thee.
(Old Testament | Exodus 20:5 - 6)
5 Thou shalt not bow down thyself to them, nor serve them: for I the LORD thy God am a jealous God, visiting the iniquity of the fathers upon the children unto the third and fourth generation of them that hate me;
6 And shewing mercy unto thousands of them that love me, and keep my commandments.