Assalaamu alaykum. There is a hadith that goes as follows: “And everyone in the heavens and on earth asks forgiveness for the knowledgeable person, even the fish in the deepest of waters asks for his forgiveness.” [Abu Dawud, Ibn Majah, Tirmidhi No. 2835 - Saheeh (authentic)] Does this 'everyone' include non-Muslims. And if so, then how?
All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
It is known that the non-Muslims do not seek forgiveness for the Muslim scholars (or students of Islamic knowledge); rather, what is meant by everyone on earth is the righteous among mankind and the jinn and all kinds of animals.
Al-Muth-hiri said in Sharh Al-Masaabeeh:
“His saying, ‘And everyone in the heavens and on earth seek forgiveness for the knowledgeable person, as well as the fish...’ means the inhabitants of the heavens and the earth, even the fish in the water supplicate with goodness for the people of knowledge and seek forgiveness for them, because those who seek knowledge seek the revival of the religion, which Allah and His Messenger, as well as the inhabitants of the heavens and the earth, are pleased with. It is for this reason that they supplicate for him, and because the benefit of knowledge reaches all animals. As for the benefit of knowledge reaching the angels, then this is because some non-Muslims say, ‘Allah does not have angels,’ and some of them say, ‘The angels are the daughters of Allah,’ and some of them worship the angels, and all this is Kufr (disbelief). The angels are harmed by all these statements. However, the people of knowledge say, ‘The angels are the slaves of Allah.’ This belief is something that is liked by Allah and His angels. So the angels supplicate for the people of knowledge; because they [people] say about them [the angels] the truth, without increasing nor decreasing anything. As for the benefit of knowledge reaching the people of the earth from mankind and the jinn, it is because they are saved from the fire because of knowledge. As for all animals, then the people of knowledge clarify the animals that are lawful and those which are unlawful, and clarify the animals that are permissible to be killed and those who are not permissible to be killed, and they clarify how to kill the animals that are permissible to eat so that they would be lawful to eat; all this is beneficial to the animals because the one who does not have knowledge would think that killing all kinds of animals other than humans is permissible, so he kills them and they are harmed by this. Since the benefit reaches the animals from the knowledgeable person, the animals supplicate for him because of his favor upon them.”
Allah knows best.
You can search for fatwa through many choices