Deuteronomy 17:7

7 The witnesses' hands are to be the first in putting him to death, and after that, the hands of all the people. You must purge the evil from you.

Deuteronomy 17:7 Meaning and Commentary

Deuteronomy 17:7

The hands of the witnesses shall be first upon him to put him
to death
Of everyone of them, as Aben Ezra; they were to cast the first stone at him, which would be a further trial and confirmation of their testimony; for if they readily and without reluctance first began the stoning of the idolater, it would not only show their zeal for the honour of the divine Being, but an unconsciousness of guilt in their testimony, and be an encouragement to others to proceed with safety:

and afterwards the hands of all the people;
should be employed in taking up stones, and casting at him until he was dead:

so thou shall put the evil away from among you;
both the evil man and the evil committed by him, which by this means would be prevented from spreading, seeing by his death others would be deterred from following his example; as well as the evil of punishment, which otherwise would have come upon the nation, had they connived at so gross an iniquity.

Deuteronomy 17:7 In-Context

5 you must bring out to your gates that man or woman who has done this evil thing and stone them to death.
6 The one condemned to die is to be executed on the testimony of two or three witnesses. No one is to be executed on the testimony of a single witness.
7 The witnesses' hands are to be the first in putting him to death, and after that, the hands of all the people. You must purge the evil from you.
8 "If a case is too difficult for you-concerning bloodshed, lawsuits, or assaults-cases disputed at your gates, you must go up to the place the Lord your God chooses.
9 You are to go to the Levitical priests and to the judge who presides at that time. Ask, and they will give you a verdict in the case.
Holman Christian Standard Bible ® Copyright © 2003, 2002, 2000, 1999 by Holman Bible Publishers.  Used by permission.  All rights reserved.