It was narrated that Ma’qil ibn Yassaar said: the Messenger of Allaah (peace and blessings of Allaah be upon him) said:
“For one of you to be stabbed in the head with an iron needle is better for him than that he should touch a woman who is not permissible for him.”
Narrated by al-Tabaraani in al-Kabeer, 486. Shaykh al-Albaani said in Saheeh al-Jaami’, 5045, that this hadeeth is saheeh.