Deuteronomy 17:6
At the mouth of two witnesses, or three witnesses, shall he that is worthy of death be put to death; but at the mouth of one witness he shall not be put to death. At the mouth of two witnesses, or three witnesses, shall he that is worthy of death be put to death; but at the mouth of one witness he shall not be put to death.
No one could be put to death on his own testimony alone, for condemnation to death required the testimony of other witnesses. The condemnation of Jesus violated this rule, since nothing had been proven against him, making his sentence unlawful.
In punishment by stoning, the witnesses in the case were to be the first to cast a stone. The rule applied to one judged worthy of death, such as a woman accused of violating the seventh commandment, for whom Moses commanded stoning. When scribes and Pharisees brought such a woman to ensnare him, he turned that requirement upon the plotting elders who had themselves led their victim into sin. By insisting that only one without sin throw first, the guilty accusers stood condemned and left, leaving her alone with the pitying Saviour.