This was common in the tradition of the Muslims for centuries...
This was common in the tradition of the Muslims for centuries, and for generations. Imam Malik had issued his fatwa about this matter and recommended it in his saying to al-Mansur, “Why do you turn your face away from him when he is your means and your father Adam’s means to Allah?
You should turn your face towards him and ask him to be your intercessor.’ The author of Khulasat ul-Kalam said: The scholars of the Islamic rites said that turning the face towards the Prophet’s honored tomb while visiting and praying is better than to turn it towards the Qiblah. Ibn Hajar said in al-Jawharul-Munazzam: What leads us to turn towards the Prophet’s tomb is that we all agree that the (s) is alive in his tomb and he knows his visitors.
If he (s) is alive, one cannot but turn the face towards him and turn his back to the Qiblah, therefore, it is the same to visit him in his tomb. He then quoted Malik’s saying to al-Mansur, which is mentioned above. He then said: Az-Zarqani said in his book Sharh ul-Mawahib that the books of the Malikis are full of traditions recommending praying near the tomb (of the Prophet) facing it and turning the back to the Qiblah.
He quoted from the doctrine of Abu Hanifa and that of ash-Shafi’i’s and from the generality of the schools of thought in Islam something similar. Then he said: Imam Ahmad is different from the others, but the scholars think that he turned towards the holy tomb like anybody else. On page 258, he said: As-Samhudi said: Many scholars within the four schools have mentioned in their books of Islamic rites concerning visiting the Prophet (s).
It was recommended for visitors to turn their faces towards the honored tomb beseeching Allah to forgive them and to grant them what they ask for and to make the Prophet their intercessor.
On page 263 he said: Abu Hanifa mentioned in his Musnad that Ibn Umar said, “It is recommended that when you visit the Prophet’s tomb, you turn your back to the Qiblah facing the tomb and you greet him.’ Ibn Jama’a mentions in his book al- Mansak ul-Kabir, “The sect of Abu Hanifa’ until he saidÖ “he turns until he stands towards the holy face with his back to the Qiblah and gives his greeting Previous…