Satan has prepared a spiritual trap for the saints of God. Nephi sees that the Lord will preserve and protect the saints and that the great and abominable church will be cast into the pit. Nephi more vividly explains how this happens in chapter 22 of 1 Nephi:
And the blood of that great and abominable church, which is the whore of all the earth, shall turn upon their own heads; for they shall war among themselves, and the sword of their own hands shall fall upon their own heads, and they shall be drunken with their own blood.
And every nation which shall war against thee, O house of Israel, shall be turned one against another, and they shall fall into the pit which they digged to ensnare the people of the Lord. And all that fight against Zion shall be destroyed, and that great whore, who hath perverted the right ways of the Lord, yea, that great and abominable church, shall tumble to the dust and great shall be the fall of it.
For behold, saith the prophet, the time cometh speedily that Satan shall have no more power over the hearts of the children of men (1 Nephi 22:13-15).
The secret as to how the wicked will be destroyed is said to be because they shall war among themselves. This is interesting because John the Revelator uses the same imagery of a pit to preface his discussion of the wars he sees occurring in the last days. See Rev 9:1-11, 11:7, 17:8-18. Finally, after Satan makes war with the saints, an angel casts Satan into the bottomless pit for a thousand years, And I saw an angel come down from heaven, having the key of the bottomless pit and a great chain in his hand. And he laid hold on the dragon, that old serpent, which is the Devil, and Satan, and bound him a thousand years, And cast him into the bottomless pit, and shut him up, and set a seal upon him, that he should deceive the nations no more, till the thousand years should be fulfilled (Rev 20:1-3).