(NB. this narration may not be authentic)
Two youths were seated together, when a beautiful woman came and sat beside them. In plain view of the three was a monastery of a monk who would spend his days and nights busy in worship. While they were talking, the woman noticed the monastery, and an idea came to her head. She said to her two companions, "What would you say if i told you that i was going to go and tempt the monk towards evil?"
"We would tell you that you will fail in the attempt," said the two youths.
"You are wrong, for i am able to do so." She then stood, applied perfume to her body, and wore her best and most enticing attire. Instead of going immediately, she waited until the night, for she knew that devils are most active during that time. When night-time came, she went to the gates of the monastery and called out "O slave of Allaah, open the gate for me, for i am afraid and am in need of a safe shelter."
Having no reason to doubt the stranger and wanting to help her, the monk quickly opened the gates for her. When he let her in, he saw her beautiful figure and face and realized it was not safe to be alone with her, and so he climbed the stairs of the monastery, instructing her to remain alone on the first floor. Upon reaching the second floor, he was suprised to see that she had followed him; he had nowhere to escape, and so he tried to keep a safe distance away from her. She then removed all of her clothing and came near to him, offering her body for his pleasure.
He had dedicated all of his life to worshipping Allaah, and now, in the middle of the night and hidden to all created beings, he had before him a temptation that was very difficult to resist. If he could have escaped, he probably would have tried, but the woman stood between him and the door that led to the lower floor. There was a lamp burning beside him and so he quickly put his smallest finger into the fire of the lamp, and as his finger burned, he tried to think about the hellfire. Thus he lost his smallest finger, but the woman still stood there, tempting him towards evil. Again, to remind himself about the fire of the Hellfire, he placed his nxt finger into the fire of the lamp.
When the light of morning appeared through the wondows, the monk had not succumbed to evil, but he had no more fingers remaining on his hands. So overcome was the woman by the experience of the previous night, that she repented and changed her ways: she built a monastery alongside that of the monk, and she spent her remaining days worshipping alongside him.