Similarly, (Isaiah 1:19-20) "If you acquiesce and pay heed, the good of the earth will you eat. But if you refuse and rebel, the sword will devour you; for the mouth of the L–rd has spoken." And where did He speak it? (Leviticus 26:25) "… I will bring against you an avenging sword, etc."
The Terrifying Section of Curses That God Promises Will Fall Upon
Mekhilta Tractate Pischa 12:14