In Alma 43:46–47, Mormon gave the Lord’s commandment on military matters for the Nephites: “And they were doing that which they felt was the duty which they owed to their God; for the Lord had said unto them, and also unto their fathers, that: Inasmuch as ye are not guilty of the first offense, neither the second, ye shall not suffer yourselves to be slain by the hands of your enemies. And again, the Lord has said that: Ye shall defend your families even unto bloodshed. Therefore for this cause were the Nephites contending with the Lamanites, to defend themselves, and their families, and their lands, their country, and their rights, and their religion.”
These verses place that commandment in the context of their defensive preparations. Since they were not to “give an offense,” they needed to be prepared for a strong defense against any who might come against them. As the label for “enemy,” the Lamanites were typically the enemy they had to defend against. That will continue through the end of the Book of Mormon, but we will see the Gadiantons arise as a different enemy, and one that foretold the eventual Nephite destruction.
Verse 16 ties the defensive warfare into the covenant of the land, where the Nephites would be protected upon their righteousness. Thus, verse 16 notes that the Nephites should keep the commandments of God. It is important for modern readers to understand that while the covenant of protection was certain, it was not one that meant that the Nephites did not have to act on their own behalf. They needed to act as though they were on their own, but trusting that, with Jehovah’s assistance, their efforts would be sufficient.