That is what they could reach of knowledge. Verily, your Lord it is He Who knows best him who goes astray from His Path, and He knows best him who receives guidance. (30) And to Allâh belongs all that is in the heavens and all that is in the earth, that He may requite those who do evil with that which they have done (i.e. punish them in Hell), and reward those who do good, with what is best (i.e. Paradise). (31)
An-Najm
Saying of Prophet Muhammad (SAW)
Narrated 'Umar bin Al-Khattab:
I heard Allah's Apostle saying, "The reward of deeds depends upon the intentions and every person will get the reward according to what he has intended. So whoever emigrated for worldly benefits or for a woman to marry, his emigration was for what he emigrated for."