If such a case should occur, as that a man or woman transgressed the covenant of the Lord and went after other gods and worshipped them; when it was made known, the facts were to be carefully inquired into; and if the charge were substantiated, the criminal was to be led out to the gate and stoned. On the testimony of two or three witnesses, not of one only, he was to be put to death (see at Num 35:30); and the hand of the witnesses was to be against him first to put him to death, i.e., to throw the first stones at him, and all the people were to follow. With regard to the different kinds of idolatry in Deu 17:3, see Deu 4:19. (On Deu 17:4, see Deu 13:15.) “Bring him out to thy gates,” i.e., to one of the gates of the town in which the crime was committed. By the gates we are to understand the open space near the gates, where the judicial proceedings took place (cf. Neh 8:1, Neh 8:3; Job. Deu 29:7), the sentence itself being executed outside the town (cf. Deu 22:24; Act 7:58; Heb 13:12), just as it had been outside the camp during the journey through the wilderness (Lev 24:14; Num 15:36), to indicate the exclusion of the criminal from the congregation, and from fellowship with God. The infliction of punishment in Deu 17:5. is like that prescribed in Deu 13:10-11, for those who tempted others to idolatry; with this exception, that the testimony of more than one witness was required before the sentence could be executed, and the witnesses were to be the first to lift up their hands against the criminal to stone him, that they might thereby give a practical proof of the truth of their statement, and their own firm conviction that the condemned was deserving of death, - “a rule which would naturally lead to the supposition that no man would come forward as a witness without the fullest certainty or the greatest depravity” (Schnell, das isr. Recht).
(Note: “He assigned this part to the witnesses, chiefly because there are so many whose tongue is so slippery, not to say good for nothing, that they would boldly strangle a man with their words, when they would not dare to touch him with one of their fingers. It was the best remedy, therefore, that could be tried for restraining such levity, to refuse to admit the testimony of any man who was not ready to execute judgment with his own hand” (Calvin).)
הַמֵּת (Deu 17:6), the man exposed to death, who was therefore really ipso facto already dead. “So shalt thou put the evil away,” etc.: cf. Deu 13:6.