"إِنِّى اسْتَأذنْتُ رَبِّى في الاسْتِغْفَار لأُمِّى فَلَمْ يَأْذَن لِى فَدَمَعَ عَيْنَاى رَحْمَةً لَهَا، واسْتأْذَنْتُ ربى فِى زِيَارَتِهَا فأَذَن لِى، وَإِنِّى كُنتُ نهَيْتُكمْ عَنْ زِيَارَةِ الْقُبُورِ فزُورُهَا وَلْتَزِدْكُمْ زيَارَتُهَا خيْرًا) .
[Machine] We were with the Messenger of Allah ﷺ close to a thousand riders, so he stopped with us and prayed two units of prayer. Then he turned to us with his face, and his eyes were shedding tears. Umar approached him and said, "May my mother and father be sacrificed for you, O Messenger of Allah! What's wrong with you?" He said, "I sought permission from my Lord to seek forgiveness for my mother, but He did not grant me permission. So, my eyes shed tears out of mercy for her. And I sought permission from my Lord to visit her grave, and He granted me permission. And indeed, I had prohibited you from visiting graves, but now visit them, as it will increase you in goodness."
كُنَّا مَعَ رَسُولِ اللَّهِ ﷺ قَرِيبًا مِنْ أَلْفِ رَاكِبٍ فَنَزَلَ بِنَا وَصَلَّى بِنَا رَكْعَتَيْنِ ثُمَّ أَقْبَلَ عَلَيْنَا بِوَجْهِهِ وَعَيْنَاهُ تَذْرِفَانِ فَقَامَ إِلَيْهِ عُمَرُ فَفَدَاهُ بِالْأُمِّ وَالْأَبِ يَقُولُ مَا لَكَ يَا رَسُولَ اللَّهِ ﷺ؟ قَالَ «إِنِّي اسْتَأْذَنْتُ رَبِّي فِي الِاسْتِغْفَارِ لِأُمِّي فَلَمْ يَأْذَنْ لِي فَدَمَعَ عَيْنَايَ رَحْمَةً لَهَا وَاسْتَأْذَنْتُ رَبِّي فِي زِيَارَتِهَا فَأَذِنَ لِي وَإِنِّي كُنْتُ قَدْ نَهَيْتُكُمْ عَنْ زِيَارَةِ الْقُبُورِ فَزُورُوهَا وَلْيَزِدْكُمْ زِيَارَتُهَا خَيْرًا»
“The Prophet ﷺ visited the grave of his mother and wept, causing the people around him to weep. Then he said: ‘I asked my Lord for permission to seek forgiveness for her, but He did not give me permission. Then I asked my Lord for permission to visit her grave and He gave me permission. So visit the graves, for they will remind you of death.’” (Using translation from Ibn Mājah 1572)
"استأذنتُ ربِي في أنِّي أستغْفِرُ لأُمِّى، فلم يأذَنْ لي، وأستأذنتُه في أنْ أزورَ قَبْرَها فأذِنَ لي، فزوروا القُبورَ، فإِنَّها تذكِّرُكم الموْتَ ".