The Gospel of John tells us that the scribes and Pharisees brought a woman who had been caught in adultery into the temple where a crowd had come to hear Christ Jesus. See John 8:1-11 They made her stand in front of everyone; then they said to Jesus: "Master, this woman was taken in adultery, in the very act. Now Moses in the law commanded us, that such should be stoned: but what sayest thou?"
The Bible account says that they did this "tempting him, that they might have to accuse him." They knew that Jesus didn't uphold such harsh renderings of the law and could therefore himself be proved guilty of disobedience to the law. They had been looking for an opportunity to turn public opinion against Jesus and so discredit his healing works.
After hearing the accusers, the Bible says, Jesus "stooped down, and . . . wrote on the ground." When he stood up, he said, "He that is without sin among you, let him first cast a stone at her." Then he stooped down again, and the accusers, soon feeling the judgment of their own conscience, went away. When he stood up again, Jesus asked the woman, "Hath no man condemned thee?" She answered, "No man, Lord." He replied, "Neither do I condemn thee: go, and sin no more."