As Nehor taught and gathered followers, he "began to establish a church after the manner of his preaching." One day while on his way to preach to a gathering of his followers, Nehor encountered an elderly Limhite warrior named Gideon, who was a teacher in the church established by Alma the Elder. Gideon went out to withstand or warn Nehor, and their discussion quickly led to a contentious verbal argument. At this point, Gideon felt a need to admonish Nehor—probably giving a warning that put Nehor on notice.
Even though the government had been recently transformed to a system of judges rather than a king, the law remained the same. The people of Zarahemla were still following the Law of Moses and, under that law as delineated in Deuteronomy 13, a person engaged in leading people into apostasy could be put to death. The law given by Nephi also prohibited priestcrafts: The Lord "commandeth that there shall be no priestcrafts" (2 Nephi 26:29). In other words, Nehor could be charged with a serious offense under the law.
Under Jewish tradition and Israelite law, there was a requirement that the offending person needed to be warned that he was committing a crime, to be sure that he knew that what he was doing was against the law (2 Chronicles 19:5, 10). This is likely what Gideon was doing—admonishing and warning Nehor that if he persisted in agitating the people toward apostasy, he could be charged with a capital offense and even, potentially, put to death.
In the ancient world and under the Law of Moses, there were no policemen, no attorney generals, and no public prosecutors. Any legal action had to be brought by an individual citizen. Someone had to step up and say, "This has gone far enough." The old and noble man Gideon had seen this problem before in the City of Nephi. He knew where this could lead and the resultant devastation to societal norms. And thus Gideon, now a citizen of Zarahemla, stood forward and admonished Nehor with the words of God.
Gideon’s warning angered Nehor—he was "wroth with Gideon." Under Israelite law, anger and hatred functioned as the equivalent of what we could call pre-meditation to commit the crime. As set forth in Numbers 35, there is a higher degree of intentionality and culpability when killing someone in anger and hatred than when someone is killed accidentally or when somebody gets hurt during a scuffle. The fact that Nehor had a sword and pulled out his sword in anger to slay Gideon made his guilty state of mind much easier to prove. Furthermore, there were witnesses to the slaying. The people who witnessed the crime, the audience at the scene, fulfilled their civic duty and immediately took Nehor into custody and brought him before Alma to be judged according to the crimes he had committed. Notice that verse 10 does not even mention Nehor by name. He was simply identified as "the man" who slew Gideon. The record does not dignify him by mentioning his name until the very end of this brief account.
John W. Welch, The Legal Cases in the Book of Mormon (Provo, UT: BYU Press, 2008), 211–236, gives a detailed legal analysis of every step in this brief but very significant development.