The Messenger of Allah ﷺ said, "When one of you performs ablution well, then sets out for the mosque with nothing driving him out except the prayer, his left foot does not cease wiping away a sin and his right foot recording a good deed until he enters the mosque."
أن رسول الله ﷺ قال: إذا توضأ أحدكم فأحسن الوضوء، ثم خرج إلى المسجد لا ينزعه إلا الصلاة لم تزل رجله اليسرى تمحو سيئة، وتكتب الأخرى حسنة حتى يدخل المسجد.
Tabarani related it in al-Kabir (12/355), and Hakim (1/217), both through the route of Kathir bin Zayd, from Abu Abdullah Qarraz, from Ibn Umar, who said, then he mentioned it. Hakim said, "Kathir bin Zayd and Abu Abdullah Qarraz are both from Madinah, we know them only for their truthfulness, and this is a sahih hadith."I say, its chain is hasan due to the discussion about Kathir bin Zayd, except that he is hasan in his hadith, especially when his hadith has established foundations. Abu Abdullah Qarraz's name is Dinar al-Madani, one of the narrators of Muslim, trustworthy, but he transmits with gaps.As for what is related concerning the merit of "whoever goes out intending the prayer but is preceded in it is like one who prayed it and attended it," there are two daif hadiths about it.The first is what Abu Hurairah related, he said, the Prophet ﷺ said, "Whoever performs wudu and does it well, then goes and finds that the people have already prayed, Allah will give him a reward like that of one who prayed it and attended it, without diminishing anything from their rewards."Abu Dawud related it (564), and Ahmad (8947), and Hakim (1/208-209), all through the route of Abdul-Aziz bin Muhammad Darawardi, from Muhammad bin Tahlaa, from Mihsan bin Ali, from Awf bin Harith, from Abu Hurairah, who mentioned it. Hakim said, "Sahih according to the criterion of Muslim, but they did not include it."I say, this is an error on his part, for Mihsan bin Ali al-Fihri al-Madani was not narrated from by Muslim, and he is unknown, as Ibn Qattan said, even though Ibn Hibban deemed him trustworthy according to his own principle of validating unknown narrators.The second is what Saeed bin Musayab related, he said, death approached a man from the Ansar, so he said, "I am going to tell you a hadith which I would not tell you except seeking reward. I heard the Messenger of Allah ﷺ say, 'When one of you performs wudu and does the wudu well, then goes out to the prayer, he does not raise his right foot but Allah
records a good deed for him, and he does not put down his left foot but Allah
removes a bad deed from him. So let one of you go near or go far. If he comes to the masjid and prays in congregation, he is forgiven. If he comes to the masjid and finds that they have prayed some and some remains, he prays what he catches and completes what remains, he is the same. If he comes to the masjid and finds that they have already prayed, and he completes the prayer, he is the same.'"Abu Dawud related it (563), and through his route Bayhaqi (3/69), from Muhammad bin Muaz bin Abbad al-Anbari, who said, Abu Awana related to us, from Yaala bin Ata, from Mabad bin Hurmuz, from Saeed bin Musayab, who mentioned it.In it, Mabad bin Hurmuz is unknown, and no one related from him except Yaala bin Ata, yet despite this Ibn Hibban mentioned him among his trustworthy narrators according to his principle of validating unknown narrators. He alone transmitted the statement at the end of the hadith, "If he comes to the masjid and finds that they have prayed, and he completes the prayer, he is the same."Both hadiths are daif, and one does not strengthen the other, because of the unique unknown narrators found in them. The sahih hadiths mentioned earlier at the beginning of the chapter indicate merely the merit of walking to the prayer, without mentioning the reward of one who prays it in congregation.