John Proctor brings Mary Warren to court to reveal that she and the other girls were only pretending to be afflicted by witchcraft.
In a desperate attempt to save his wife, John commits to the crime of lechery, saying Elizabeth kicked her out because of it. Judge Danforth takes this into consideration and bring forward Elizabeth, who was said to never lie by John. However, to protect her husband, she denied that he is a lecherer.
Elizabeth, who was said to never lie by John, does not reveal that her husband is a lecherer in order to protect him and the family. She does not realise that she denied evidence for Abigail's guilt.
Mary then betrays John in order to save herself by accusing him of conspiring with the devil. Proctor, having nobody left to prove his innocence to witchcraft,