Sanhedrin 107 - King David and Bathsheba
David wanted to be mentioned in one breath with Abraham, Isaac, and Jacob. God told him, "I tested them, but I did not test you." David said, "Test me!" God told him, "I will, and I will even tell you what the test will be - women." David then increased relations with his wife, and he forgot that this only increases the desire.
Bathsheba was shampooing her head underneath a canopy. Satan appeared to David in the form of a bird. David shot his arrow at it, and the arrow struck and opened the canopy, making Bathsheba exposed to view. David took her and then sent her back home. Technically, Bathsheba was divorced, but it looked like David sinned with a married woman. David said, "I could have withstood the test, but I did not want people to say that a student mastered his teacher (God)." David understood that his role in life was not of a Patriarch, but of a penitent human. David then suffered for six months to expiate his sin.
Art: Jan Steen - Bathsheba Receiving David Letter