Hadith on Women: Allah knows which men gaze at women or not

Ibn Abbas reported: A woman would pray behind the Messenger of Allah, peace and blessings be upon him, who was the most beautiful of all people. Some men would come early to be in the first row, so as not to gaze at her. Some of them would come late to be in the last row. When they bowed, they would look at her between their limbs. Allah Almighty revealed the verse, “We surely know who comes first among you and We surely know who comes last.” (15:24)

Source: Sunan al-Tirmidhī 3122

Grade: Sahih (authentic) according to Al-Albani

عَنْ ابْنِ عَبَّاسٍ قَالَ كَانَتْ امْرَأَةٌ تُصَلِّي خَلْفَ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ حَسْنَاءَ مِنْ أَحْسَنِ النَّاسِ فَكَانَ بَعْضُ الْقَوْمِ يَتَقَدَّمُ حَتَّى يَكُونَ فِي الصَّفِّ الْأَوَّلِ لِئَلَّا يَرَاهَا وَيَسْتَأْخِرُ بَعْضُهُمْ حَتَّى يَكُونَ فِي الصَّفِّ الْمُؤَخَّرِ فَإِذَا رَكَعَ نَظَرَ مِنْ تَحْتِ إِبْطَيْهِ فَأَنْزَلَ اللَّهُ تَعَالَى وَلَقَدْ عَلِمْنَا الْمُسْتَقْدِمِينَ مِنْكُمْ وَلَقَدْ عَلِمْنَا الْمُسْتَأْخِرِينَ

3122 سنن الترمذي كتاب تفسير القرآن باب ومن سورة الحجر

3122 المحدث الألباني خلاصة حكم المحدث صحيح في صحيح الترمذي