Alma 46:31 - 46:35
Alma 46: 31 Therefore Moroni thought it was expedient that he should take his armies, who had gathered themselves together, and armed themselves, and entered into a covenant to keep the peace—and it came to pass that he took his army and marched out with his tents into the wilderness, to cut off the course of Amalickiah in the wilderness.
Moroni now fearing that Amalickiah with his followers would unite with the Lamanites, gathered together his forces and went after Amalickiah as he was making his way through the wilderness towards the land of Nephi.
Alma 46: 32 And it came to pass that he did according to his desires, and marched forth into the wilderness, and headed the armies of Amalickiah.
Moroni enters the wilderness to head off Amalickiah.
Alma 46: 33 And it came to pass that Amalickiah fled with a small number of his men, and the remainder were delivered up into the hands of Moroni and were taken back into the land of Zarahemla.
Amalickiah managed to get away with a few followers. The rest were captured by Moroni and taken back to Zarahemla.
Alma 46: 34 Now, Moroni being a man who was appointed by the chief judges and the voice of the people, therefore he had power according to his will with the armies of the Nephites, to establish and to exercise authority over them.
Since Moroni had authority to do as he saw fit in regards to his prisoners, gave them a choice.
Alma 46: 35 And it came to pass that whomsoever of the Amalickiahites that would not enter into a covenant to support the cause of freedom, that they might maintain a free government, he caused to be put to death; and there were but few who denied the covenant of freedom.
They could either covenant to be faithful to the government of the Nephites and support the system of government that was acceptable to the people or they would be executed. The ones that refused to make the covenant were put to death, but there were few that would not enter into the covenant.
One would indeed have a great deal of hatred towards Moroni and the Nephite government and its freedoms to be willing to die rather than swear loyalty towards it. There are many examples in history of this willingness to die for causes that were insane to start with. We will see more as we see in the extremists in the world today.