Mary Warren admits to John and Elizabeth Proctor that the girls are faking their visions of spirits. When Elizabeth is accused of witchcraft, John Proctor insists that Mary Warren tell the truth in front of Danforth and the court.
Mary Warren agrees to do this and is brought to the court. When she confesses to her own part in earlier faking her visions and being carried away in the heat of the moment, Marry Warren pleads with Abigail and the other girls to admit the truth also and confess.
Mary openly admits that the behavior of all the girls is mere pretense.
Abigail responds quickly to Mary Warren's accusations. Abigail has far too much to lose in a potential admission to fraud and false accusation. People have been sentenced to death and have already died as a result of the trials.
Abigail, with her friends, denies lying and acts as if she is being bewitched by Mary.
Mary Warren succumbs to Abigail's pressure and tactics and turns against John Proctor, paving the way for his arrest.
Though Mary Warren could see what the moral choice was and could see that it was up to her to save Elizabeth Proctor from a death sentence based on a false charge, she was not strong enough to stand up to social pressure. She chose to save herself instead of Elizabeth.