The Prophet (ﷺ) said, "The rewards (of deeds) are according to the intention, and…

Sahih al-Bukhari Book 67 Hadith 8

Sahih al-Bukhari #5070

Wedlock, Marriage (Nikaah) 67:8

Narrated `Umar bin Al-Khattab:

The Prophet (ﷺ) said, "The rewards (of deeds) are according to the intention, and everybody will get the reward for what he has intended. So whoever emigrated for Allah's and His Apostle's sake, his emigration was for Allah and His Apostle; and whoever emigrated for worldly benefits, or to marry a woman, then his emigration was for the thing for what he emigrated for." (1)

Chapter: Whoever emigrated with the intention of marrying a woman

Grade: Sahih